-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomHttp.yml
63 lines (57 loc) · 1.84 KB
/
customHttp.yml
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
customHeaders:
# Cache-Regeln für HTML-Dateien (dynamische Inhalte)
- pattern: "**/*.html"
headers:
- key: Cache-Control
value: no-cache, no-store, must-revalidate
- key: Pragma
value: no-cache
# Cache-Regeln für JavaScript-Dateien (statische Inhalte)
- pattern: "**/*.js"
headers:
- key: Cache-Control
value: public, max-age=604800, immutable
# Cache-Regeln für CSS-Dateien (statische Inhalte)
- pattern: "**/*.css"
headers:
- key: Cache-Control
value: public, max-age=604800, immutable
# Cache-Regeln für Bilddateien (statische Inhalte mit langfristigem Caching)
- pattern: "**/*.png"
headers:
- key: Cache-Control
value: public, max-age=31536000, immutable
- pattern: "**/*.jpg"
headers:
- key: Cache-Control
value: public, max-age=31536000, immutable
- pattern: "**/*.jpeg"
headers:
- key: Cache-Control
value: public, max-age=31536000, immutable
- pattern: "**/*.svg"
headers:
- key: Cache-Control
value: public, max-age=31536000, immutable
# Cache-Regeln für API-Endpunkte (keine Caching-Regeln für dynamische Daten)
- pattern: "/api/*"
headers:
- key: Cache-Control
value: no-cache, no-store, must-revalidate
# Cache-Regeln für JSON-Dateien (Dateninhalte)
- pattern: "**/*.json"
headers:
- key: Cache-Control
value: public, max-age=300, must-revalidate
# Allgemeine Sicherheits- und Optimierungs-Header
- pattern: "**/*"
headers:
# Sicherheit: X-Content-Type-Options Header
- key: X-Content-Type-Options
value: nosniff
# Sicherheit: X-Frame-Options Header
- key: X-Frame-Options
value: SAMEORIGIN
# Sicherheit: Cross-Origin Header
- key: Cross-Origin-Resource-Policy
value: same-origin