nginx with gitlab self host and cookie/session expired problems

Rejaine Da Silveira Monteiro rejaine at bhz.jamef.com.br
Fri Jan 24 13:47:56 UTC 2025


Hi,

I am using Nginx as a reverse proxy for my self-hosted GitLab
instance. When accessing GitLab through this proxy, I frequently
experience logouts with a "session expired" error, even during active
sessions.

The GitLab URL is configured as gitlab.mydomain.com. However, when
logging out of GitLab, all other company services using *.mydomain.com
are also disconnected, even for sites that do not share the same
certificate (GitLab uses a wildcard certificate) or those without a
certificate at all.

After some research, I discovered that GitLab appears to delete all
cookies for the domain during logout. There even seems to be a fix for
this issue:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142740

Now, I’m wondering if the frequent logouts (session expiration) might
be related to this cookie issue, and if there are any suggestions for
addressing it via Nginx.

Thanks

-- 
*Esta mensagem pode conter informações confidenciais ou privilegiadas, 
sendo seu sigilo protegido por lei. Se você não for o destinatário ou a 
pessoa autorizada a receber esta mensagem, não pode usar, copiar ou 
divulgar as informações nela contidas ou tomar qualquer ação baseada nessas 
informações. Se você recebeu esta mensagem por engano, por favor avise 
imediatamente ao remetente, respondendo o e-mail e em seguida apague-o. 
Agradecemos sua cooperação.*


More information about the nginx mailing list