Skip to content

Commit

Permalink
Added cors headers
Browse files Browse the repository at this point in the history
  • Loading branch information
umerfaruk committed Sep 4, 2024
1 parent c0e49ab commit 7280fdc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ http {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
}

error_page 500 502 503 504 /50x.html;
Expand Down

0 comments on commit 7280fdc

Please sign in to comment.