proxyauth: send user to oidc login instead of /login

This commit is contained in:
Johannes Zellner
2024-04-15 19:20:00 +02:00
parent 37e2269387
commit c3be0018fe
2 changed files with 9 additions and 4 deletions

View File

@@ -303,7 +303,7 @@ server {
proxy_set_header Content-Length "";
}
location ~ ^/(login|logout|callback)$ {
location ~ ^/(logout|callback)$ {
proxy_pass http://127.0.0.1:3001;
}
@@ -370,7 +370,7 @@ server {
proxy_set_header Content-Length "";
}
location ~ ^/(login|logout)$ {
location ~ ^/(logout|callback)$ {
proxy_pass http://127.0.0.1:3001;
}
@@ -381,7 +381,8 @@ server {
if ($http_user_agent ~* "container") {
return 401;
}
return 302 /login?redirect=$request_uri;
return 302 "https://<%= proxyAuth.oidcEndpoint %>/openid/auth?client_id=<%= proxyAuth.oidcClientId %>&scope=openid profile email&response_type=code&redirect_uri=https://<%= vhost %>/callback";
}
location / {