Reputation: 291
I'm making a Chrome plugin that calls a PHP script on my server, but I keep getting the "No 'Access-Control-Allow-Origin' header is present on the requested resource." error.
I have added the header settings in my Nginx config, so I have no idea what else could be the problem.
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET';
try_files $uri $uri/ /index.html;
}
Upvotes: 3
Views: 6581
Reputation: 182
Upvotes: 1