-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
61 lines (50 loc) · 1.03 KB
/
Caddyfile
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
{
admin off
persist_config off
log {
level warn
}
}
(must_headers) {
header {
Strict-Transport-Security "max-age=31536000; includesubdomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "strict-origin-when-cross-origin"
X-Xss-Protection "1; mode=block"
Expect-CT "max-age=604800"
-Server
}
}
(proxy) {
header_down X-Powered-By "European Geo Information"
header_down Server "Caddy httpd"
}
(caching) {
header {
Cache-Control "public, max-age=604800, must-revalidate"
}
}
:8080 {
import must_headers
import caching
handle_path /tiles/dark-matter/* {
reverse_proxy https://basemaps.cartocdn.com:443 {
header_up Host {upstream_hostport}
import proxy
}
}
handle /* {
root * /usr/share/html
file_server
# for spa
try_files {path} /index.html
templates index.html {
between {$CADDY_TEMPLATE_ENCLOSED_BEGIN} {$CADDY_TEMPLATE_ENCLOSED_END}
}
encode zstd gzip
}
}
:2019 {
metrics /metrics
}