From a2d4de3db5e76562307ed807e9a7a4fe55845956 Mon Sep 17 00:00:00 2001 From: Danny Date: Sun, 4 Apr 2021 17:27:30 +0200 Subject: [PATCH] Added support for code-server logout button Newly added logout button in menu "File --> Logout" only reloads the page because the cookies are somehow not getting deleted. Adding the /login/ location with these parameters solves this problem. --- code-server.subdomain.conf.sample | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/code-server.subdomain.conf.sample b/code-server.subdomain.conf.sample index 6354989..b0b9084 100644 --- a/code-server.subdomain.conf.sample +++ b/code-server.subdomain.conf.sample @@ -37,4 +37,28 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + + location /login/ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app code-server; + set $upstream_port 8443; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_hide_header Set-Cookie; + proxy_ignore_headers Set-Cookie; + proxy_set_header Cookie ""; + + } }