Files
ITAM/docker/frontend/default.conf
이태훈 dea6beee0b fix: 부품 마스터 서브 탭 복구 및 모바일 QR 코드 접근 시 Nginx 라우팅 오류 해결
- 부품 마스터 페이지 내 상단 헤더(.page-header)가 존재하지 않는 경우에도 '부품 표준 등급' 및 '직무별 기준 사양' 탭이 최상단에 안전하게 표시되도록 보완
- 모바일 QR 스캔 시 확장자 없는 가상 경로(/mobile) 요청이 데스크톱 메인 페이지(/index.html)로 Fallback되던 현상을 수정하기 위해 Nginx 설정에 내부 rewrite 규칙 추가
- 에이전트 개발 규칙 파일(.agents/AGENTS.md) 등록
2026-06-29 15:27:17 +09:00

57 lines
1.5 KiB
Plaintext

server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
# Logging
access_log /var/log/nginx/frontend-access.log main;
error_log /var/log/nginx/frontend-error.log warn;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Gzip compression
gzip on;
gzip_types text/plain text/css text/xml text/javascript
application/x-javascript application/xml+rss
application/json application/javascript;
gzip_min_length 1000;
# Serve static files with SPA fallback
location / {
rewrite ^/mobile$ /mobile.html last;
try_files $uri $uri/ /index.html;
}
# Cache static assets (60 days)
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|webp|woff|woff2|ttf|eot)$ {
expires 60d;
add_header Cache-Control "public, immutable";
}
# Don't cache HTML files
location ~* \.html$ {
expires -1;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Health check
location /health {
access_log off;
return 200 "OK\n";
add_header Content-Type text/plain;
}
# Deny access to sensitive files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}