Nginx CORS error

Request header field Access-Control-Allow-Headers is not allowed by Access-Control-Allow-Headers

add these lines in server part of the config file
   add_header ‘Access-Control-Allow-Origin’ * always;
        add_header ‘Access-Control-Allow-Headers’ * ;
 location ~* .(?:ico|css|js|gif|jpe?g|png|woff|application/json)$ {
            try_files $uri @blogcssjs;
            expires 30d;
            add_header ‘Access-Control-Allow-Origin’ * always;
            add_header Pragma public;
            add_header Cache-Control “public”;

Leave a Comment

Your email address will not be published. Required fields are marked *

Open chat