mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-02-28 01:46:10 +01:00
Merge pull request #15526 from Security-Onion-Solutions/jertel/wip
do not allow auth redirection to login page or home page; that serves…
This commit is contained in:
@@ -383,12 +383,16 @@ http {
|
||||
|
||||
location @error401 {
|
||||
if ($request_uri ~* (^/connect/.*|^/oauth2/.*)) {
|
||||
return 401;
|
||||
return 401;
|
||||
}
|
||||
|
||||
if ($request_uri ~* ^/(?!(^/api/.*))) {
|
||||
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
|
||||
}
|
||||
|
||||
if ($request_uri ~* ^/(?!(api/|login|auth|oauth2|$))) {
|
||||
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
|
||||
}
|
||||
return 302 /auth/self-service/login/browser;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user