Created
November 19, 2018 19:40
-
-
Save ti-ka/50979e17d8a33f9988b811bdbe8fd186 to your computer and use it in GitHub Desktop.
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
server { | |
server_name example.com; | |
listen 80; | |
# Security: Do not allow iframe | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
location / { | |
root /var/www/app; | |
try_files $uri /index.html; | |
} | |
} |
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
# For Http Upgrades (eg. Websockets) | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
server_name api.omnidek.com | |
listen 80; | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
location / { | |
proxy_pass http://127.0.0.1:5000; | |
proxy_http_version 1.1; | |
proxy_pass_request_headers on; | |
proxy_buffering off; | |
client_max_body_size 0; | |
proxy_connect_timeout 30; | |
proxy_send_timeout 30; | |
proxy_read_timeout 120; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment