generated from nichoth/template-ts-preact-htm-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
30 lines (26 loc) · 831 Bytes
/
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
[[headers]]
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
access-control-allow-methods = "POST,GET,PUT,OPTIONS"
Access-Control-Allow-Headers = "Origin, X-Requested-With, Content-Type, Accept, Authorization"
Access-Control-Max-Age = "2592000"
Access-Control-Allow-Credentials = "true"
# Cache-Control = "public, immutable, max-age=31536000" # immutable paths
# Cache-Control = "public, max-age=0, must-revalidate"
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/:splat"
status = 200
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[functions]
directory = "netlify/functions"
node_bundler = "esbuild"
[build]
command = "npm run build"
environment = { NODE_VERSION = '18' }
functions = "netlify/functions"
publish = "public"