From c6858c006bd0fce52e96fb4b5a4c9ec2b6fea25b Mon Sep 17 00:00:00 2001 From: Leandro Lafin Date: Fri, 12 Jul 2024 15:22:28 -0300 Subject: [PATCH] NGINX return 403 for sign_in (#2322) --- contrib/local-environment/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/local-environment/nginx.conf b/contrib/local-environment/nginx.conf index 42fc06e3..ffb5f8e2 100644 --- a/contrib/local-environment/nginx.conf +++ b/contrib/local-environment/nginx.conf @@ -20,7 +20,7 @@ server { # If the auth_request denies the request (401), redirect to the sign_in page # and include the final rd URL back to the user's original request. - error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri; + error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri; # Alternatively send the request to `start` to skip the provider button # error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri; @@ -54,7 +54,7 @@ server { # If the auth_request denies the request (401), redirect to the sign_in page # and include the final rd URL back to the user's original request. - error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri; + error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri; # Alternatively send the request to `start` to skip the provider button # error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;