diff --git a/nginx.conf b/nginx.conf index 2f7415a..33ea2b4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,12 +3,21 @@ server { root /usr/share/nginx/html; index index.html; + # 보안 헤더 + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + # index.html은 캐싱 금지 (배포 후 즉시 반영) location = /index.html { try_files $uri =404; add_header Cache-Control "no-store, no-cache, must-revalidate"; } + # Vite 해시 에셋 장기 캐싱 + location /assets/ { + add_header Cache-Control "public, max-age=31536000, immutable"; + } + # SPA fallback (react-router 사용 시 필요) location / { try_files $uri $uri/ /index.html; diff --git a/src/components/AnnouncementBoard.jsx b/src/components/AnnouncementBoard.jsx index 214a75a..0e2039c 100644 --- a/src/components/AnnouncementBoard.jsx +++ b/src/components/AnnouncementBoard.jsx @@ -29,6 +29,7 @@ export default function AnnouncementBoard() {