-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Add] nginx config to include improvements for server side hosting an…
…d adding no-caching
- Loading branch information
samatrhea
committed
Feb 22, 2024
1 parent
fb38586
commit 7228997
Showing
2 changed files
with
35 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
map $http_connection $connection_upgrade { | ||
"~*Upgrade" $http_connection; | ||
default keep-alive; | ||
} | ||
|
||
server { | ||
server_name comet-web.cdp4.org; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:8086; | ||
|
||
# Configuration for WebSockets | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_cache off; | ||
|
||
# WebSockets were implemented after http/1.0 | ||
proxy_http_version 1.1; | ||
|
||
# Configuration for LongPolling or if your KeepAliveInterval is longer than 60 seconds | ||
proxy_read_timeout 100s; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
# kill cache | ||
add_header Last-Modified $date_gmt; | ||
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | ||
if_modified_since off; | ||
expires off; | ||
etag off; | ||
} | ||
} |