Compare commits

...

1 Commits

Author SHA1 Message Date
Jason Ertel
1fcd8a7c1a API errors will no longer redirect 2026-03-13 16:53:38 -04:00
2 changed files with 4 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ check_err() {
echo 'No route to host'
;;
160)
echo 'Incompatiable Elasticsearch upgrade'
echo 'Incompatible Elasticsearch upgrade'
;;
161)
echo 'Required intermediate Elasticsearch upgrade not complete'

View File

@@ -387,15 +387,13 @@ http {
error_page 429 = @error429;
location @error401 {
if ($request_uri ~* (^/connect/.*|^/oauth2/.*)) {
if ($request_uri ~* (^/api/.*|^/connect/.*|^/oauth2/.*)) {
return 401;
}
if ($request_uri ~* ^/(?!(^/api/.*))) {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
}
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
if ($request_uri ~* ^/(?!(api/|login|auth|oauth2|$))) {
if ($request_uri ~* ^/(?!(login|auth|oauth2|$))) {
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
}
return 302 /auth/self-service/login/browser;