nginx allow localhost cors code example
Example 1: nginx enable cors
add_header Access-Control-Allow-Origin *;
Example 2: cors access-control-allow-origin header to nginx
add_header 'Access-Control-Allow-Origin' 'origin'
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Origin' 'origin'