Skip to content

Commit

Permalink
nginx.conf update for static app
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Apr 8, 2024
1 parent 421b3d1 commit 0458e06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ server {
root /usr/share/nginx/html;
index index.html;
error_page 404 /404.html;

location / {
try_files $uri.html $uri $uri/ /index.html;
try_files $uri $uri/ /index.html =404;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Credentials false;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods GET, POST, OPTIONS;
add_header Access-Control-Allow-Methods GET;
add_header Access-Control-Allow-Methods POST;
add_header Access-Control-Allow-Methods OPTIONS;
add_header Access-Control-Expose-Headers *;

}
}

0 comments on commit 0458e06

Please sign in to comment.