-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
executable file
·46 lines (38 loc) · 1.08 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
[build]
publish = "public"
command = "hugo --minify --gc"
[build.environment]
HUGO_VERSION = "0.106.0"
GO_VERSION = "1.19.4"
HUGO_BASEURL = "/"
[[headers]]
for = "/*" # This defines which paths this specific [[headers]] block will cover.
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "same-origin"
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
[[redirects]]
from = "/testauth/"
to = "/testlogin/"
status = 200
force = false
query = {path = ":path"}
conditions = {Role = ["admin"]}
[[redirects]]
from = "/"
to = "/admin/"
status = 301
force = false
query = {path = ":path"}
conditions = {Role = ["admin"]}
## This rule redirects to an external API, signing requests with a secret
[[redirects]]
from = "/search"
to = "https://api.mysearch.com"
status = 200
force = true # COMMENT: ensure that we always redirect
headers = {X-From = "Netlify"}
signed = "API_SIGNATURE_TOKEN"
# In this example, visitors whose JWT tokens include the `admin` or
# `editor` role can access the `/admin` path.