From 6fc1bea0129871863abee07643faf8b009894040 Mon Sep 17 00:00:00 2001 From: Chika Date: Wed, 7 Dec 2022 00:08:29 +0300 Subject: [PATCH] updates for Evo.Auth --- nginx.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 3f62f38..0e5f56b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,7 +17,13 @@ server { include /etc/nginx/mime.types; # AUTHENTICATION - error_page 401 /login; + error_page 401 @error401; + + location @error401 { + add_header Cache-Control 'no-store, no-cache'; + rewrite ^ /login?uri=$request_uri permanent; + } + location = /auth { internal; @@ -28,7 +34,7 @@ server { proxy_set_header X-Original-Remote-Addr $remote_addr; proxy_set_header X-Original-Host $host; } - + location ~ ^/(login|signin|logout|get-user) { proxy_pass http://auth_server; }