-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from maticnetwork/DEVOPS-2599-cors-issue-update
Update for nginx
- Loading branch information
Showing
2 changed files
with
13 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,15 @@ | ||
# nginx.conf | ||
server { | ||
listen 0.0.0.0:80; | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
error_page 404 /404.html; | ||
location / { | ||
try_files $uri.html $uri $uri/ /index.html; | ||
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-Expose-Headers *; | ||
|
||
user nginx; | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
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-Expose-Headers *; | ||
|
||
} | ||
} | ||
} |