Home > database >  No 'Access-Control-Allow-Origin' header error, but it's available
No 'Access-Control-Allow-Origin' header error, but it's available

Time:11-11

I have created a proxy server using nginx. I installed SSL certificate using Certbot. After installing SSL, I get No 'Access-Control-Allow-Origin' header error on the frontend. I added the add_header 'Access-Control-Allow-Origin' '*' command to .conf file. But I keep getting the same error.

Error: Access to fetch at 'https://api.mywebsite.com/api/users' from origin 'https://panel.mywebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

my frontend website: Request Entity Too Large Error

  • Related