forked from letsencrypt/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
219 lines (191 loc) · 4.49 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
[build]
publish = "public/"
command = "hugo -d public"
[build.environment]
# same as .travis.yml
HUGO_VERSION = "0.79.1"
# https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file
# headers must be the same than in config/_default/server.toml (for Hugo)
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "no-referrer"
Permissions-Policy = """
geolocation=(),
midi=(),
notifications=(),
push=(),
sync-xhr=(),
microphone=(),
camera=(),
magnetometer=(),
gyroscope=(),
speaker=(self),
vibrate=(),
fullscreen=(self),
interest-cohort=()
"""
# "style-src unsafe-inline:" Cf https://github.com/letsencrypt/website/issues/950
# "connect-src https://d4twhgtvn0ff5.cloudfront.net/" for stats graphs
# "img-src data: blob:" is for Plotly download feature
# "script-src unsafe-eval unsafe-inline data:": For Google Analytics
# "form-action" is NOT set, so it allows everything (it doesn't default to default-src). If restricted, It must allow at least www.paypal.com and its redirects
Content-Security-Policy = """
default-src 'none';
font-src 'self';
style-src 'unsafe-inline' 'self';
script-src 'unsafe-eval' 'unsafe-inline' 'self' data:
https://www.google-analytics.com
https://www.googleadservices.com
https://www.googletagmanager.com
https://googleads.g.doubleclick.net
https://donorbox.org
https://js.stripe.com/v3/
https://sdks.shopifycdn.com
;
img-src 'self' data: blob:
https://www.google-analytics.com
https://www.paypal.com
https://www.paypalobjects.com
https://ak2s.abmr.net
https://ak1s.abmr.net
https://www.google.com
https://cdn.shopify.com
https://v.shopify.com
;
frame-src
https://donorbox.org
https://www.youtube.com
https://www.youtube-nocookie.com
https://bid.g.doubleclick.net
https://js.stripe.com/v3/
https://js.stripe.com/v2/
;
connect-src 'self'
https://d4twhgtvn0ff5.cloudfront.net/
https://letsencrypt-merch.myshopify.com
https://monorail-edge.shopifysvc.com
;
"""
[[headers]]
for = "/repository"
[headers.values]
# For WebTrust Audits
# Cf https://github.com/letsencrypt/website/pull/976
Referrer-Policy = "strict-origin"
[[headers]]
for = "/:lang/repository"
[headers.values]
# For WebTrust Audits
# Cf https://github.com/letsencrypt/website/pull/976
Referrer-Policy = "strict-origin"
[[headers]]
for = "/certs/*.pem"
[headers.values]
# Because Netlify defaults to "application/x-x509-ca-cert", which is for DER.
Content-Type = "application/x-pem-file"
Content-Disposition = "inline"
# https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file
[[redirects]]
from = "/jobs"
to = "https://www.abetterinternet.org/careers"
status = 302
force = false
[[redirects]]
from = "/certs"
to = "/certificates"
status = 302
force = false
[[redirects]]
from = "/howitworks"
to = "/getting-started"
status = 302
force = false
[[redirects]]
from = "/ct-logs"
to = "/docs/ct-logs"
status = 302
force = false
[[redirects]]
from = "/de/*"
to = "/de/404.html"
status = 404
force = false
[[redirects]]
from = "/es/*"
to = "/es/404.html"
status = 404
force = false
[[redirects]]
from = "/fr/*"
to = "/fr/404.html"
status = 404
force = false
[[redirects]]
from = "/he/*"
to = "/he/404.html"
status = 404
force = false
[[redirects]]
from = "/id/*"
to = "/id/404.html"
status = 404
force = false
[[redirects]]
from = "/ja/*"
to = "/ja/404.html"
status = 404
force = false
[[redirects]]
from = "/ko/*"
to = "/ko/404.html"
status = 404
force = false
[[redirects]]
from = "/pt-br/*"
to = "/pt-br/404.html"
status = 404
force = false
[[redirects]]
from = "/ru/*"
to = "/ru/404.html"
status = 404
force = false
[[redirects]]
from = "/sr/*"
to = "/sr/404.html"
status = 404
force = false
[[redirects]]
from = "/sv/*"
to = "/sv/404.html"
status = 404
force = false
[[redirects]]
from = "/zh-cn/*"
to = "/zh-cn/404.html"
status = 404
force = false
[[redirects]]
from = "/zh-tw/*"
to = "/zh-tw/404.html"
status = 404
force = false
[[redirects]]
from = "/vi/*"
to = "/vi/404.html"
status = 404
force = false
[[redirects]]
from = "https://lencr.org/*"
to = "https://letsencrypt.org/docs/lencr.org"
status = 302
force = true
[[redirects]]
from = "https://www.lencr.org/*"
to = "https://letsencrypt.org/docs/lencr.org"
status = 302
force = true