-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
54 lines (45 loc) · 1.34 KB
/
netlify.toml
File metadata and controls
54 lines (45 loc) · 1.34 KB
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
[build]
publish = "docs/_build/html"
command = "pip install -e .[docs-build] && cd docs && make html"
[build.environment]
PYTHON_VERSION = "3.9"
SPHINX_BUILD = "true"
# Redirect rules for clean URLs
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Headers for security and performance
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;"
# Cache static assets
[[headers]]
for = "/_static/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "*.css"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "*.js"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "*.png"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "*.jpg"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "*.ico"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"