mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Update NGINX configuration files to add websocket support
This commit is contained in:
parent
cd51342183
commit
5732e644e1
@ -20,6 +20,11 @@ upstream gitlab-workhorse {
|
||||
server localhost:8181 fail_timeout=0;
|
||||
}
|
||||
|
||||
map $http_upgrade $connection_upgrade_gitlab {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
## Normal HTTP host
|
||||
server {
|
||||
## Either remove "default_server" from the listen line below,
|
||||
@ -56,6 +61,8 @@ server {
|
||||
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 {{NGINX_X_FORWARDED_PROTO}};
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade_gitlab;
|
||||
|
||||
proxy_pass http://gitlab-workhorse;
|
||||
}
|
||||
|
||||
@ -24,6 +24,11 @@ upstream gitlab-workhorse {
|
||||
server localhost:8181 fail_timeout=0;
|
||||
}
|
||||
|
||||
map $http_upgrade $connection_upgrade_gitlab {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
## Redirects all HTTP traffic to the HTTPS host
|
||||
server {
|
||||
## Either remove "default_server" from the listen line below,
|
||||
@ -103,6 +108,9 @@ server {
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto {{NGINX_X_FORWARDED_PROTO}};
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade_gitlab_ssl;
|
||||
|
||||
proxy_pass http://gitlab-workhorse;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user