I am getting the following error in my browser console when I try to upload a 3MB file to my Cloudflare proxied endpoint:
Access to XMLHttpRequest at 'https://api2.zzz.com/upload_s3' from origin 'XYZ' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Uploads of less than 1MB don’t seem to be a problem. But a 3MB file would trigger the error and disallow the file upload.
I have tried the following below but still no luck:
i) double-checked firewall events and do not see events that are blocked
ii) set a page rule for https://api2.zzz.com/upload_s3 to have security disabled
Large file uploads (~3MB) are working when I remove the Cloudflare proxy from the loop, so definitely something to do with Cloudflare here.
Anybody run into this problem or have suggestions?
I would appreciate any suggestions as I am still looking at this problem with no luck. Here is a summary of what I’m trying to do:
I can get my flask app to respond without HTTPS/SSL. But am receiving a ‘503 Service Unavailable’ when I am trying to use SSL. My understanding is since the load balancer has the Cloudflare origin certificate installed, it will SSL terminate so the flask app does not need modifications for SSL.
Here is my Kubernetes yaml for the load balancer and flask app service: