-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
netlify.toml
143 lines (116 loc) · 4.83 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
# If not set, defaults to the root directory.
base = ""
# Directory that contains the deploy-ready HTML files and assets generated by
# the build. This is relative to the base directory if one has been set, or the
# root directory if a base has not been set. This sample publishes the
# directory located at the absolute path "root/project/build-output"
publish = "public/"
# Default build command.
command = "cd app && npm run deploy"
# [[plugins]]
# # Installs the Lighthouse Build Plugin for all deploy contexts
# package = "@netlify/plugin-lighthouse"
# # Production context: all deploys from the Production branch set in your site’s
# # Branches settings in the UI will inherit these settings.
# [context.production]
# publish = "output/"
# command = "make publish"
# environment = { ACCESS_TOKEN = "super secret", NODE_VERSION = "14.15.3" }
# # Deploy Preview context: all deploys generated from a pull/merge request will
# # inherit these settings.
# [context.deploy-preview]
# publish = "dist/"
# # Here is another way to define context specific environment variables.
# [context.deploy-preview.environment]
# ACCESS_TOKEN = "not so secret"
# # Branch Deploy context: all deploys that are not from a pull/merge request or
# # from the Production branch will inherit these settings.
# [context.branch-deploy]
# command = "echo branch"
# [context.branch-deploy.environment]
# NODE_ENV = "development"
# # Specific branch context: all deploys from this specific branch will inherit
# # these settings.
# [context.staging] # “staging” is a branch name
# command = "echo 'staging'"
# base = "staging"
# # For contexts of branches with special characters, enclose the branch name
# # with quotes.
# [context."feat/branch"]
# command = "echo 'special branch'"
# base = "branch"
# # Redirects and headers are GLOBAL for all builds – they do not get scoped to
# # contexts no matter where you define them in the file.
# # For context-specific rules, use _headers or _redirects files, which are
# # PER-DEPLOY.
# # A basic redirect rule
# [[redirects]]
# from = "/*"
# to = "/blog/:splat"
# # A redirect rule with many of the supported properties
# [[redirects]]
# from = "/old-path"
# to = "/new-path"
# # The default HTTP status code is 301, but you can define a different one.
# status = 302
# # By default, redirects won’t be applied if there’s a file with the same
# # path as the one defined in the `from` property. Setting `force` to `true`
# # will make the redirect rule take precedence over any existing files.
# force = true
# # Redirect from /old-path?id=123 to /new-path. Each combination of query
# # params needs to be defined in a separate [[redirects]] block.
# # More information at https://docs.netlify.com/routing/redirects/redirect-options/#query-parameters
# query = {id = ":id"}
# # Redirect based on conditions including browser language, geolocation,
# # identity role, and/or cookie presence.
# conditions = {Language = ["en"], Country = ["US"]}
# # Sign each request with a value defined in an environment variable
# signed = "API_SIGNATURE_TOKEN"
# # You can also define custom headers within your redirects blocks.
# [redirects.headers]
# X-From = "Netlify"
# X-Api-Key = "some-api-key-string"
# # Role-based redirects do not have a “to” property.
# [[redirects]]
# from = "/gated-path"
# status = 200
# conditions = {Role = ["admin"]}
# force = true
# # The following redirect is intended for use with most SPAs that handle
# # routing internally.
# [[redirects]]
# from = "/*"
# to = "/index.html"
# status = 200
# [[headers]]
# # Define which paths this specific [[headers]] block will cover.
# for = "/*"
# [headers.values]
# X-Frame-Options = "DENY"
# X-XSS-Protection = "1; mode=block"
# Content-Security-Policy = "frame-ancestors https://www.facebook.com"
# # Multi-value headers are expressed with multi-line strings.
# cache-control = '''
# max-age=0,
# no-cache,
# no-store,
# must-revalidate'''
# # Basic-Auth allows you to password protect your whole site.
# # This feature may not be available on all plans.
# Basic-Auth = "someuser:somepassword anotheruser:anotherpassword"
[functions]
# Directory with serverless functions, including background functions,
# to deploy. This is relative to the base directory if one has been set,
# or the root directory if a base hasn’t been set.
directory = "netlify/functions"
# # An Edge Handler declaration
# [[edge_handlers]]
# path = "/*"
# handler = "filterRequests"
# [dev]
# publish = "public/"