-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
44 lines (37 loc) · 856 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# example netlify.toml
[dev]
targetPort = 3000
command = "pnpm run dev"
[build]
command = "pnpm run build"
functions = "netlify/functions"
publish = "dist"
[functions]
node_bundler = "esbuild"
[[redirects]]
from = "/api/*" # simplify all calls to serverless functions
to = "/.netlify/functions/:splat" # all function calls will go to this path
status = 200 # ok code
force = true # ensure to always redirect
[[redirects]]
from = "/member/*"
to = "/member/:splat"
force = true
status = 200
conditions = {Role = ["member"]}
[[redirects]]
from = "/member/*"
to = "/member-only"
force = true
status = 401
[[redirects]]
from = "/admin/*"
to = "/admin/:splat"
force = true
status = 200
conditions = {Role = ["editor", "admin"]}
[[redirects]]
from = "/admin/*"
to = "/"
force = true
status = 401