Commit 1e44ad22 authored by Kevin Daudt's avatar Kevin Daudt 💻
Browse files

gitlab: add X-Forwarded-Ssl header to nginx patch

This header is required for rails to recognize the connection is
encrypted and send the _gitlab_session cookie.

155e8cab (gitlab/nginx: link config in new location, 2021-11-21) moved
the default location for the nginx config to match upstream. Because in
already deployed setups, the config is missing, the entrypoint will copy
the default gitlab nginx config to the new location. This file was
missing the required header, resulting in a 422 unprocessible entity
error when trying to login, because the session cookie is missing.

Add the X-Forwarded-Ssl header to the default nginx config to address that.
parent 8fac2f49
......@@ -40,3 +40,11 @@ index 74eb8634d..8b440237e 100644
location / {
client_max_body_size 0;
@@ -98,6 +100,7 @@ server {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment