• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved nginx proxy and CORS problems

L. Hagen

Basic Pleskian
Hi,

this is my first post and I really hope that someone of you can help me, please.

Since two days I'm trying to get running CORS via a HTTPS connection. The beakcground:

  • nginx as a proxy for apache (OS is Ubuntu) on a virtual root server
  • CDN at Amazon CloudFront where the fonts are stored (there is also a working certificate running - tested with JPEGs, JS files etc.)
I also read and tried nearly everything I could find via Google, changed configurations etc. Nothing seems to work. The fonts will be loaded from the CDN but are not shown (No 'Access-Control-Allow-Origin' header is present on the requested resource.)

I would be very glad if someone of you could give me an advice how to get this CORS to be enabled.

Thank you in advance and best regards,
Lars
 
If I remember correctly, the CORS header must be sent from the source server, not from your own web server, so probably you must add the header to the data delivered from your Amazon CloudFront.
 
Hi Peter,

thank you for your hint. Well I tried now to insert this in the header, but I guess it does not work as well.

Do you have any other ideas?
 
Well, now it is working. I've made a complete "invalidate" at the CDN and removed all additional headers (before "Access-Control-Allow-Origin" and "Orign" were set). After the CDN had been enabled again it is working now... (for what reason ever) :)

Thanks for your help
 
Back
Top