Skip to content

Commit 64daf8d

Browse files
committed
TRY: WASM Build for Netlify again with subdomain
1 parent cf19038 commit 64daf8d

File tree

1 file changed

+53
-5
lines changed

1 file changed

+53
-5
lines changed

example/netlify.toml

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
1-
[[headers]]
2-
for = "/*"
3-
[headers.values]
4-
Cross-Origin-Embedder-Policy = "require-corp"
5-
Cross-Origin-Opener-Policy = "same-origin"
1+
# Global headers for all paths and domains
2+
[[
3+
headers
4+
]]
5+
for = "/*"
6+
[
7+
headers.values
8+
]
9+
Cross-Origin-Embedder-Policy = "require-corp"
10+
Cross-Origin-Opener-Policy = "same-origin"
11+
# Add additional security headers
12+
X-Frame-Options = "DENY"
13+
X-Content-Type-Options = "nosniff"
14+
Referrer-Policy = "strict-origin-when-cross-origin"
15+
Permissions-Policy = "interest-cohort=()"
16+
17+
# Specific headers for WASM files
18+
[[
19+
headers
20+
]]
21+
for = "/*.wasm"
22+
[
23+
headers.values
24+
]
25+
Content-Type = "application/wasm"
26+
27+
# Specific configuration for the custom domain
28+
[[
29+
redirects
30+
]]
31+
from = "https://playground.flexcolorscheme.com/*"
32+
to = "/index.html"
33+
status = 200
34+
force = true
35+
headers = {Cross-Origin-Embedder-Policy = "require-corp", Cross-Origin-Opener-Policy = "same-origin"}
36+
37+
# Specific configuration for the Netlify domain
38+
[[
39+
redirects
40+
]]
41+
from = "https://themesplayground.netlify.app/*"
42+
to = "/index.html"
43+
status = 200
44+
force = true
45+
headers = {Cross-Origin-Embedder-Policy = "require-corp", Cross-Origin-Opener-Policy = "same-origin"}
46+
47+
# Fallback redirect for SPA
48+
[[
49+
redirects
50+
]]
51+
from = "/*"
52+
to = "/index.html"
53+
status = 200

0 commit comments

Comments
 (0)