mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
connect
This commit is contained in:
@@ -235,7 +235,7 @@ http {
|
||||
|
||||
location /connect/ {
|
||||
if ($http_authorization !~ "Bearer .*") {
|
||||
return 403;
|
||||
return 401;
|
||||
}
|
||||
rewrite /connect/(.*) /api/$1 break;
|
||||
proxy_pass http://{{ GLOBALS.manager }}:9822/;
|
||||
@@ -360,6 +360,9 @@ http {
|
||||
error_page 429 = @error429;
|
||||
|
||||
location @error401 {
|
||||
if ($request_uri ~* (^/connect/.*|^/oauth2/.*)) {
|
||||
return 401;
|
||||
}
|
||||
if ($request_uri ~* ^/(?!(^/api/.*))) {
|
||||
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
|
||||
}
|
||||
@@ -367,6 +370,9 @@ http {
|
||||
}
|
||||
|
||||
location @error403 {
|
||||
if ($request_uri ~* (^/connect/.*|^/oauth2/.*)) {
|
||||
return 403;
|
||||
}
|
||||
add_header Set-Cookie "ory_kratos_session=;Path=/;Max-Age=0;expires=Thu, 01 Jan 1970 00:00:00 GMT;";
|
||||
return 302 /auth/self-service/login/browser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user