Streaming live at 10am (PST)

Can Webflow edit header response to fix CORS policy block?

I have a site, where I draw a canvas for an HTML div using htmcl2canvas.js. I then create the image in a new tab for users to download. This works, however, the images I use to draw the canvas are blocked, therefore they aren’t rendered in the actual image.

error from console [redacted image URL and website]:
Access to image at ‘[image_url]’ from origin ‘[https://mysite.com]’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

My images are stored in AWS S3. I’ve already gone in and set CORS policy to the following:
(create in JSON format):
[
{
“AllowedHeaders”: [
“*”
],
“AllowedMethods”: [
“GET”
],
“AllowedOrigins”: [
https://www.mysite.com
],
“ExposeHeaders”:
}
]

The next logical step is to try to set response headers to ensure the browser allows it, however, I cannot locate where to change headers for WebFlow. I’m not too privy to PHP, but I understood that I can modify the headers in there, but it seems as though we cannot use PHP in WebFlow, is that correct?

I have also found an older forum where it’s stated that WebFlow has no option to update headers nor an option to include, is this still the case?

IF PHP AND THE OPTION TO MODIFY HEADER REQUEST/RESPONSE, WHAT OPTIONS DO I HAVE TO RESOLVE THIS ISSUE.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

That’s right. You have no access to run server side scripts.

Yes this is still the case.

Host the site yourself where you have control. Unfortunately e-commerce. the CMS. Search, and forms wont work when you host a site on your own.

1 Like

@webdev Sorry for my delayed reply, but thank you for your quick response! I’ve used another web hosting service that met my needs. Great platform to design on though, hopefully, you guys can overcome whatever barriers exist that prevent you from these options.