-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
62 lines (51 loc) · 1.33 KB
/
netlify.toml
File metadata and controls
62 lines (51 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[build]
command = "npm run build"
publish = "dist/public"
functions = "netlify/functions"
[build.environment]
NODE_VERSION = "18"
# 정적 파일 처리
[build.processing]
skip_processing = false
[build.processing.css]
bundle = true
minify = true
[build.processing.js]
bundle = true
minify = true
[build.processing.html]
pretty_urls = true
# SPA 리다이렉트 설정 (API 먼저)
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/api/:splat"
status = 200
# 모든 요청을 index.html로 리다이렉트 (SPA 처리)
# Netlify는 정적 파일(ads.txt, robots.txt, sitemap.xml 등)을 리다이렉트보다 먼저 처리하므로 별도 규칙 불필요
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# ads.txt 헤더 설정 (plain text로 서빙)
[[headers]]
for = "/ads.txt"
[headers.values]
Content-Type = "text/plain"
Cache-Control = "public, max-age=3600"
[[headers]]
for = "/robots.txt"
[headers.values]
Content-Type = "text/plain"
Cache-Control = "public, max-age=3600"
# 기본 문서 설정
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
# index.html에 대한 캐시 설정
[[headers]]
for = "/index.html"
[headers.values]
Cache-Control = "no-cache"