mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-14 02:32:02 +00:00
34 lines
703 B
Nginx Configuration File
34 lines
703 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name tinyauth.127.0.0.1.sslip.io;
|
|
|
|
location / {
|
|
proxy_pass http://tinyauth:3000;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name whoami.127.0.0.1.sslip.io;
|
|
|
|
location / {
|
|
proxy_pass http://whoami;
|
|
auth_request /tinyauth;
|
|
error_page 401 = @tinyauth_login;
|
|
}
|
|
|
|
location /tinyauth {
|
|
internal;
|
|
proxy_pass http://tinyauth:3000/api/auth/nginx;
|
|
proxy_set_header x-original-url $scheme://$http_host$request_uri;
|
|
}
|
|
|
|
location @tinyauth_login {
|
|
return 302 http://tinyauth.127.0.0.1.sslip.io/login?redirect_uri=$scheme://$http_host$request_uri;
|
|
}
|
|
}
|