poc nginx node auth

This commit is contained in:
2019-11-07 22:25:03 +01:00
commit e02476651a
15 changed files with 622 additions and 0 deletions

31
nginx/nginx.conf Normal file
View File

@@ -0,0 +1,31 @@
server {
listen 80;
server_name localhost;
location /api {
auth_request /auth;
auth_request_set $auth_header $upstream_http_x_auth_status;
proxy_set_header X-Auth-Status $auth_header;
add_header X-Auth-Status $auth_header always;
proxy_pass http://nodepod:3000;
}
location /auth {
internal;
proxy_pass http://nodepod:3000/auth;
proxy_pass_request_body off;
proxy_set_header Contet-Lenght "";
proxy_set_header X-Original_URI $request_uri;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}