forked from OpenClassrooms-Student-Center/GameOn-website-FR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
66 lines (56 loc) · 1.84 KB
/
netlify.toml
File metadata and controls
66 lines (56 loc) · 1.84 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
55
56
57
58
59
60
61
62
63
64
65
66
# Netlify Configuration - PIXEL CLASH Championship
# https://docs.netlify.com/configure-builds/file-based-configuration/
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
# Headers de sécurité
[[headers]]
for = "/*"
[headers.values]
# Security Headers
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "geolocation=(), microphone=(), camera=()"
# Content Security Policy
Content-Security-Policy = """
default-src 'self';
script-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com;
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
font-src 'self' https://fonts.gstatic.com;
img-src 'self' data: https: https://www.google-analytics.com https://www.googletagmanager.com;
connect-src 'self' https://submit-form.com https://www.google-analytics.com https://analytics.google.com https://region1.google-analytics.com;
frame-ancestors 'none';
base-uri 'self';
form-action 'self' https://submit-form.com;
"""
# Cache des assets statiques
[[headers]]
for = "/fonts/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/*.jpg"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/*.webp"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/*.png"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# Redirections
[[redirects]]
from = "/inscription"
to = "/#inscription"
status = 301
# 404 personnalisée
[[redirects]]
from = "/*"
to = "/404"
status = 404