Hello,
I have an issue using Cloudflare and Stackpath together.
I use SP to serve resources to my website via cookie free domain. If the most of the images are correctly loaded, the ones set as background images are not displayed correctly (I get a 403 forbidden).
Is there a way to solve this problem via Cloudflare?
Hello sdayman,
sure, the url is https://palazzofiano.it, the main background image seems to be served directly from the origin domain and not from stakpack. You’ll see a white page, it’s the background image which is not correctly loaded.
Then it must be something on the server blocking the request.
Can you check the file permissions for that background image? I can get a different image (2020/01/planimetria_specchi02.png) from your domain with no issue.
If it’s set to Read for Owner/Group/World, then check server error logs for another possible cause.
When i just tried to access the site, i had the same problem, no background image and error 403 to get the image.
I tried to access it directly through the link
" palazzofiano.it/wp-content/uploads/2020/02/palazzofianoFOTO-1.jpg "
and successfully load it.
When i refresh the site, everything loaded normally, but it’s cached… meaning from different browser i still have the 403 error.
Hi Rui,
yes, it’s the thing I’m trying to figure out.
The image is directly accessible but it’s not served by StackPath and it seems to be blocked
I doubted it too. I spoke with Stackpath support but they told me they couldn’t do anything by their side and to contact Cloudflare community for further info.
I already read the article, thank you for your support!
You said it is disabled, but I am still pretty convinced it is the issue mentioned by @sdayman. The error message returned is pretty specific about that.
The problem is you are embedding that image via a CSS file loaded from Stackpath instead of your domain. Either you enable hotlinking or your change where you load the CSS file from.
Ok, I found it! I disabled hotlinking and now it seems to work. The images are correctly displayed.
The only thing I do not understand why background images are the only ones not served by Stackpath. Is there a way to force it?