config/nginx.auth.conf: update for POST /login

This commit is contained in:
vchikalkin 2023-11-02 12:49:39 +03:00
parent b559225f5c
commit 5652f58b17

View File

@ -6,6 +6,11 @@ upstream auth_api {
server auth_api:3001;
}
map $request_method $login_proxy {
POST http://auth_api/$AUTH_MODE/login;
GET http://auth_web;
}
upstream app {
server $APPLICATION;
}
@ -50,15 +55,14 @@ server {
proxy_intercept_errors on;
}
location ~ ^/(signin|logout|get-user)$ {
location /login {
proxy_pass $login_proxy;
}
location ~ ^/(logout|get-user)$ {
proxy_pass http://auth_api/$AUTH_MODE/$1;
}
location ~ ^/login {
proxy_pass http://auth_web;
}
location / {
proxy_pass http://app;