13de8d1bf3
This image can be used to put basic auth in front of a service. Change-Id: I8105da864e1b39ccd6af8ba646133fa7f24b9317
18 lines
395 B
Plaintext
18 lines
395 B
Plaintext
server {
|
|
listen 8000;
|
|
server_name localhost;
|
|
location / {
|
|
proxy_pass http://localhost:5000/;
|
|
|
|
# Basic Auth
|
|
limit_except OPTIONS {
|
|
auth_basic "Restricted";
|
|
auth_basic_user_file "auth.htpasswd";
|
|
}
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|