forked from niksirbi/MyWebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
83 lines (68 loc) · 1.51 KB
/
netlify.toml
File metadata and controls
83 lines (68 loc) · 1.51 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[build]
publish = ".next"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
# Redirects for old Hugo URLs to new Next.js URLs
[[redirects]]
from = "/author/*"
to = "/about"
status = 301
[[redirects]]
from = "/authors/*"
to = "/about"
status = 301
[[redirects]]
from = "/publication/*"
to = "/publications"
status = 301
[[redirects]]
from = "/project/*"
to = "/projects"
status = 301
[[redirects]]
from = "/talk/*"
to = "/publications"
status = 301
[[redirects]]
from = "/slides/*"
to = "/publications"
status = 301
[[redirects]]
from = "/courses/*"
to = "/experience"
status = 301
[[redirects]]
from = "/home/*"
to = "/"
status = 301
# Specific post redirects
[[redirects]]
from = "/post/getting-started/*"
to = "/blog"
status = 301
[[redirects]]
from = "/post/*"
to = "/blog"
status = 301
# Files
[[redirects]]
from = "/files/cv.pdf"
to = "/files/SakkosCV.pdf"
status = 301
# Cache headers for static Caltrain data (hourly updates)
[[headers]]
for = "/data/caltrain/*"
[headers.values]
Cache-Control = "public, max-age=3600, stale-while-revalidate=86400"
[[headers]]
for = "/data/caltrain/plots/*"
[headers.values]
Cache-Control = "public, max-age=3600, stale-while-revalidate=86400"
# Headers for API CORS
[[headers]]
for = "/api/*"
[headers.values]
Access-Control-Allow-Origin = "*"
Access-Control-Allow-Methods = "GET, POST, PUT, DELETE, OPTIONS"
Access-Control-Allow-Headers = "Content-Type, Authorization"