k8s-mgmt-pod/docker/nginx/webssh.conf
Michael Trip 4dbcde381f
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 2m21s
initial commit
2026-06-23 15:06:17 +02:00

40 lines
No EOL
1 KiB
Text

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 3000;
listen [::]:3000;
server_name _;
location = / {
return 302 $scheme://$http_host/ssh/host/127.0.0.1;
}
location = /ssh {
return 302 $scheme://$http_host/ssh/host/127.0.0.1;
}
location = /ssh/host {
return 302 $scheme://$http_host/ssh/host/127.0.0.1;
}
location ~ ^/ssh/host/(?!127\.0\.0\.1(?:/|$)).+ {
return 302 $scheme://$http_host/ssh/host/127.0.0.1;
}
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_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 Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
}
}