Security: protect app with HTTP Basic Auth

This commit is contained in:
Ponte
2026-02-11 19:56:57 +01:00
parent ce40912629
commit 621beee036
5 changed files with 25 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ server {
root /usr/share/nginx/html;
index index.html;
auth_basic "Acces protege";
auth_basic_user_file /etc/nginx/.htpasswd;
location /api/ {
proxy_pass http://video-games-api:3001/api/;
@@ -15,6 +17,7 @@ server {
}
location = /health {
auth_basic off;
proxy_pass http://video-games-api:3001/health;
proxy_http_version 1.1;
}