feat: 보안 강화 + 자동화 도구 3종 추가 (웹 크롤러·PPT·엑셀)

- lib/security.ts: escapeHtml, isValidEmail, sanitizeStr, checkRateLimit 유틸 추가
- next.config.ts: 보안 헤더 적용 (X-Frame-Options, HSTS, Permissions-Policy 등)
- api/contact: XSS 방어, Rate Limit(5/min), 입력 길이 제한
- api/payment/confirm: 사용자 인증·소유권 검증, 타입 체크, 에러 메시지 정제
- api/admin/quotes: PUT 허용 필드 화이트리스트 적용
- api/saju/analyze: 로그인·결제 검증, 입력 크기 제한, gender 값 검증
- public/downloads/web_scraper_v1.0.py: requests+BS4+openpyxl 웹 크롤러
- public/downloads/ppt_automation_v1.0.py: python-pptx+openpyxl PPT 자동화
- app/services/automation/tools/scraper: 크롤러 상세 페이지 추가
- app/services/automation/tools/ppt: PPT 도구 상세 페이지 추가
- app/services/automation/page.tsx: scraper ready=true, email→PPT 교체

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 07:25:46 +09:00
parent 273da6b7b3
commit df22691d50
11 changed files with 1626 additions and 66 deletions

View File

@@ -1,7 +1,42 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
async headers() {
return [
{
source: "/:path*",
headers: [
// 클릭재킹 방지
{ key: "X-Frame-Options", value: "DENY" },
// MIME 스니핑 방지
{ key: "X-Content-Type-Options", value: "nosniff" },
// Referrer 정책
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
// XSS 필터 (레거시 브라우저)
{ key: "X-XSS-Protection", value: "1; mode=block" },
// HTTPS 강제 (Vercel은 자동 HTTPS이므로 안전)
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
// 권한 정책
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
],
},
// API 엔드포인트: 캐시 금지 + CORS 차단
{
source: "/api/:path*",
headers: [
{ key: "Cache-Control", value: "no-store, max-age=0" },
// 동일 출처 요청만 허용 (외부 도메인 API 직접 호출 차단)
{ key: "X-Frame-Options", value: "DENY" },
],
},
];
},
};
export default nextConfig;