- 순찰/점검 기능 개선 (zone-detail 페이지 추가) - 출근/근태 시스템 개선 (연차 조회, 근무현황) - 작업분석 대분류 그룹화 및 마이그레이션 스크립트 - 모바일 네비게이션 UI 추가 - NAS 배포 도구 및 문서 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
102 lines
1.9 KiB
JavaScript
102 lines
1.9 KiB
JavaScript
/**
|
|
* 보안 설정 (Helmet)
|
|
*
|
|
* HTTP 헤더 보안 설정
|
|
*
|
|
* @author TK-FB-Project
|
|
* @since 2025-12-11
|
|
*/
|
|
|
|
/**
|
|
* Helmet 보안 설정 옵션
|
|
*/
|
|
const helmetOptions = {
|
|
/**
|
|
* Content Security Policy
|
|
* XSS 공격 방지
|
|
*/
|
|
contentSecurityPolicy: {
|
|
directives: {
|
|
defaultSrc: ["'self'"],
|
|
styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"],
|
|
scriptSrc: ["'self'", "'unsafe-inline'", "'unsafe-eval'"], // 개발 중 unsafe-eval 허용
|
|
imgSrc: ["'self'", "data:", "https:", "blob:"],
|
|
fontSrc: ["'self'", "https://fonts.gstatic.com"],
|
|
connectSrc: ["'self'", "https://api.technicalkorea.com"],
|
|
frameSrc: ["'none'"],
|
|
objectSrc: ["'none'"]
|
|
}
|
|
},
|
|
|
|
/**
|
|
* HTTP Strict Transport Security (HSTS)
|
|
* HTTPS 강제 사용
|
|
*/
|
|
hsts: {
|
|
maxAge: 31536000, // 1년
|
|
includeSubDomains: true,
|
|
preload: true
|
|
},
|
|
|
|
/**
|
|
* X-Frame-Options
|
|
* 클릭재킹 공격 방지
|
|
*/
|
|
frameguard: {
|
|
action: 'deny'
|
|
},
|
|
|
|
/**
|
|
* X-Content-Type-Options
|
|
* MIME 타입 스니핑 방지
|
|
*/
|
|
noSniff: true,
|
|
|
|
/**
|
|
* X-XSS-Protection
|
|
* XSS 필터 활성화
|
|
*/
|
|
xssFilter: true,
|
|
|
|
/**
|
|
* Referrer-Policy
|
|
* 리퍼러 정보 제어
|
|
*/
|
|
referrerPolicy: {
|
|
policy: 'strict-origin-when-cross-origin'
|
|
},
|
|
|
|
/**
|
|
* X-DNS-Prefetch-Control
|
|
* DNS prefetching 제어
|
|
*/
|
|
dnsPrefetchControl: {
|
|
allow: false
|
|
},
|
|
|
|
/**
|
|
* X-Download-Options
|
|
* IE8+ 다운로드 옵션
|
|
*/
|
|
ieNoOpen: true,
|
|
|
|
/**
|
|
* X-Permitted-Cross-Domain-Policies
|
|
* Adobe 제품의 크로스 도메인 정책
|
|
*/
|
|
permittedCrossDomainPolicies: {
|
|
permittedPolicies: 'none'
|
|
},
|
|
|
|
/**
|
|
* Cross-Origin-Resource-Policy
|
|
* 크로스 오리진 리소스 공유 설정
|
|
* 이미지 등 정적 파일을 다른 포트에서 로드할 수 있도록 허용
|
|
*/
|
|
crossOriginResourcePolicy: {
|
|
policy: 'cross-origin'
|
|
}
|
|
};
|
|
|
|
module.exports = helmetOptions;
|