Cannot enable CORS in nginx

Dung Tran Tien dung.trantien at
Mon Apr 29 07:54:50 UTC 2019

Hi everyone,
I'm using nginx 1.10.3 in Ubuntu 16.04. I tried to enable CORS same exactly this configuration, but I still got the error:

POST 403
(index):1 Access to XMLHttpRequest at 'https://' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Please advise me how to fix the issue.

Dung Tran Tien
ICT Specialist

T +84.28.7109 1234, F +84.28.629 738 86, M +84 933 893 489

Ho Chi Minh Office:
Hai Au Building, 39B Truong Son, Ward 4, Tan Binh District, Ho Chi Minh City, Vietnam
106?39'51"East / 10?48'32"North<,%20106.664329+(Axon%20Active%20Vietnam)&iwloc=A&hl=en>

Da Nang Office:
PVcomBank Building, 30/4 Street, Hai Chau District, Da Nang, Vietnam
108?13'15"East / 16?2'27"North<,%20108.220597+(Axon%20Active%20Vietnam)&iwloc=A&hl=en>

Can Tho Office:
Toyota-NinhKieu Building, 57-59A Cach Mang Thang Tam Street, Can Tho, Vietnam
105?46'34"East / 10?2'57"North <'57.3%22N+105%C2%B046'34.3%22E/@10.0492503,105.7739993,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d10.049245!4d105.776188>

San Francisco Office:
281 Ellis Str, San Francisco, CA 94102, United States
122?24'39"West / 37?47'6"North<'05.7%22N+122%C2%B024'38.7%22W/@37.784913,-122.410747,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0?hl=en-US>

Luzern Office:
Schl?ssli Sch?negg, Wilhelmsh?he, Luzern 6003, Switzerland
8?17'52"East / 47?3'1"North<'01.0%22N+8%C2%B017'52.0%22E/@47.0502778,8.2955891,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0?hl=en>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list