Commit 1ce017b8 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: Auto-redirection on login page if error 401

parent a501ac5d
...@@ -55,6 +55,7 @@ http { ...@@ -55,6 +55,7 @@ http {
fastcgi_temp_path {{ param_tempdir['fastcgi_temp_path'] }}; fastcgi_temp_path {{ param_tempdir['fastcgi_temp_path'] }};
uwsgi_temp_path {{ param_tempdir['uwsgi_temp_path'] }}; uwsgi_temp_path {{ param_tempdir['uwsgi_temp_path'] }};
scgi_temp_path {{ param_tempdir['scgi_temp_path'] }}; scgi_temp_path {{ param_tempdir['scgi_temp_path'] }};
error_page 401 @login;
location / { location / {
proxy_pass http://{{ param_nginx_frontend['runner-ip'] }}:{{ param_nginx_frontend['runner-port'] }}; proxy_pass http://{{ param_nginx_frontend['runner-ip'] }}:{{ param_nginx_frontend['runner-port'] }};
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
...@@ -90,5 +91,8 @@ http { ...@@ -90,5 +91,8 @@ http {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} }
location @login {
rewrite .* /login permanent;
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment