mirror of
https://github.com/replicatedhq/ttl.sh.git
synced 2026-08-25 03:07:15 +00:00
move zot and web to upstreams with keepalives and remove websocket adjacent headers
This commit is contained in:
@@ -17,15 +17,12 @@ server {
|
||||
|
||||
# Next.js web app
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_pass http://ttlsh_web;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# Block listing catalog
|
||||
@@ -41,12 +38,25 @@ server {
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_read_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
proxy_pass http://ttlsh_zot;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "";
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
upstream ttlsh_zot {
|
||||
server 127.0.0.1:5000;
|
||||
keepalive 64;
|
||||
keepalive_timeout 60s;
|
||||
}
|
||||
|
||||
upstream ttlsh_web {
|
||||
server 127.0.0.1:3000;
|
||||
keepalive 32;
|
||||
keepalive_timeout 60s;
|
||||
}
|
||||
Reference in New Issue
Block a user