Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17852

CORS Support - Nginx

$
0
0

Hi All,

Having some trouble with enabling CORS support within Nginx. If I add the following:

add_header X-Served-By web10-690505; add_header Access-Control-Allow-Origin *;

to the http block within the main nginx.conf file, it works and all is good. However if I add it to the server block of the website configuration then it does not work.

According to Nginx documentation, it should work within the http block. Anyone have any ideas ?

nginx version: nginx/1.8.0 CentOS 6.5

submitted by linux_man
[link][1 comment]

Viewing all articles
Browse latest Browse all 17852