mirror of
http://nostr-git-proxy.forgejo.svc.cluster.local/git/45387ca441053e230b2126802005eb03767ab59d84555e8bac86b6e7def14e27/bestdadjokes
synced 2026-11-03 07:26:59 +00:00
All checks were successful
Build and Deploy / deploy (push) Successful in 14s
- Adds HSTS (max-age=31536000; includeSubDomains) - Adds X-Frame-Options SAMEORIGIN - Adds Permissions-Policy disabling unused browser APIs - Repeats headers in static asset location block to prevent Nginx inheritance drop Closes #58c277c25ba1760db42586a1321d46446d3f168b49363983223b02f77d4e6471
37 lines
1.3 KiB
Nginx Configuration File
37 lines
1.3 KiB
Nginx Configuration File
worker_processes 1;
|
|
error_log /dev/stderr warn;
|
|
pid /tmp/nginx.pid;
|
|
events { worker_connections 1024; }
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
access_log /dev/stdout;
|
|
sendfile on;
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
|
|
gzip_min_length 1024;
|
|
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
error_page 404 /404.html;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
location ~* \.(css|js|svg|png|jpg|ico|woff2?)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
}
|
|
location / {
|
|
try_files $uri $uri/ $uri/index.html =404;
|
|
}
|
|
}
|
|
}
|