do not redirect to API URLs when not logged in

This commit is contained in:
Jason Ertel
2023-07-24 17:05:52 -04:00
parent 83bff72cd4
commit 101e2e8ba1

View File

@@ -296,7 +296,9 @@ http {
error_page 429 = @error429;
location @error401 {
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
if ($request_uri ~* ^/(?!(^/api/.*))) {
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
}
return 302 /auth/self-service/login/browser;
}