generated from nhoizey/pack11ty
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnetlify.toml
71 lines (58 loc) · 1.87 KB
/
netlify.toml
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
[build]
command = "npm i pagefind @pagefind/linux-x64 && npm run build"
publish = "_site"
functions = "functions"
edge_functions = "edge_functions"
[build.environment]
NODE_OPTIONS = "--max_old_space_size=4096"
[[edge_functions]]
path = "/*"
function = "headers"
[[redirects]]
from = "https://nho-photo.netlify.app"
to = "https://nicolas-hoizey.photo"
status = 301
force = true
[[redirects]]
from = "/images/:width/*"
to = "https://res.cloudinary.com/nho/image/fetch/q_auto,f_auto,w_:width,c_limit/https://nicolas-hoizey.photo/:splat"
status = 200
[[redirects]]
from = "/landscape/:width/*"
to = "https://res.cloudinary.com/nho/image/fetch/q_auto,f_auto,g_auto,w_:width,ar_3:2,c_fill/https://nicolas-hoizey.photo/:splat"
status = 200
[[redirects]]
from = "/portrait/:width/*"
to = "https://res.cloudinary.com/nho/image/fetch/q_auto,f_auto,g_auto,w_:width,ar_2:3,c_fill/https://nicolas-hoizey.photo/:splat"
status = 200
[[redirects]]
from = "/kml/*"
to = "https://res.cloudinary.com/nho/image/fetch/q_auto,f_auto,w_300,h_300,c_limit/bo_1px_solid_black/bo_2px_solid_white/https://nicolas-hoizey.photo/:splat"
status = 200
# Cache all assets for 1 month
[[headers]]
for = "/ui/*"
[headers.values]
Cache-Control = "public, max-age=2592000, immutable"
[[headers]]
for = "/*.webmanifest"
[headers.values]
Content-Type = "application/manifest+json"
Cache-Control = "public, max-age=2592000, immutable"
# Speculation rules: https://developer.chrome.com/blog/speculation-rules-improvements#speculation-rules_http_header
[[headers]]
for = "/speculation-rules.json"
[headers.values]
Content-Type = "application/speculationrules+json; charset=utf-8"
[[headers]]
for = "/ui/thumbnails/sprite.*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[headers]]
for = "/photos/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[headers]]
for = "/api/*"
[headers.values]
Access-Control-Allow-Origin = "*"