add security headers to nginx responses

This commit is contained in:
2026-09-06 18:25:50 +03:00
parent 404bfc4972
commit 7548015770
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -5,6 +5,11 @@ server {
root /usr/share/nginx/html;
index index.html;
# SPA ve statik dosyalarda API ile aynı temel tarayıcı güvenlik politikaları.
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
include /etc/nginx/mime.types;
# Vite, pdf.js worker'ını .mjs uzantısıyla üretiyor; Debian'ın mime.types
# dosyasında mjs yok → application/octet-stream sunuluyordu ve tarayıcı