Add static homelab dashboard with Docker and nginx setup
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
# Custom nginx config (used by the Dockerfile).
|
||||
# Serves the static dashboard with sensible caching + security headers.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
|
||||
# Hide nginx version
|
||||
server_tokens off;
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
}
|
||||
Reference in New Issue
Block a user