feat: add protected data.json endpoint with Basic Auth and content type headers

This commit is contained in:
Greg 2025-05-29 17:32:59 +02:00
parent 1c79adb906
commit d1b292e1f8

View File

@ -43,6 +43,12 @@ http {
gzip on; gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Deny direct access to any files that might be mapped under a /data/ URI path
location /data/ {
deny all;
return 404; # Or 403 Forbidden
}
location / { location / {
include /etc/nginx/nginx-auth.conf; # Apply Basic Auth to the whole site include /etc/nginx/nginx-auth.conf; # Apply Basic Auth to the whole site
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;