CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hi! i have a problem with CORS issue for generalugiveaways.com. I have the api on: api.generalugiveaways.com, but on the main websitei get erorrs fors CORS. MY NGINX CONFIG for api: (attachment)
No description
3 Replies
FlaviaN
FlaviaNOP4mo ago
i also use cors
No description
FlaviaN
FlaviaNOP4mo ago
No description
Rhaegal
Rhaegal4mo ago
If you add or change CORS configuration at your origin web server, purging the Cloudflare cache by URL does not update the CORS headers. You must force Cloudflare to retrieve the new CORS headers as outlined in the documentation: https://developers.cloudflare.com/cache/cache-security/cors/#add-or-change-cors-headers
Cloudflare Docs
Cross-Origin Resource Sharing (CORS)
A cross-origin request is a request for website resources external to the origin. For example, a.example.com attempts to serve resources from b.secondexample.com. CORS instructs the browser to determine if a cross-origin request, such as an image or JavaScript from b.secondexample.com, is allowed by a.example.com. The browser does not load resou...

Did you find this page helpful?