-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
61 lines (47 loc) · 1010 Bytes
/
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
{
# Disable the internal admin of Caddy
admin off
# Your email, to generate SSL certificates
email {$CADDY_CERT_EMAIL}
}
# This is for portainer
{$CADDY_HOSTNAME_PORTAINER} {
# Hide server header field
header /* {
-Server
}
# Compress with gzip --best
encode {
gzip 9
}
# Reverse proxy to the Portainer UI
reverse_proxy {
to http://ui:9000
header_up X-Forwarded-Proto {scheme}
header_up X-Forwarded-For {remote}
header_up X-Real-IP {remote}
}
}
# This is for the static site
{$CADDY_HOSTNAME_SITE} {
# Hide server header field
header /* {
-Server
}
# Cache js-dos assets
header /jsdos/* {
Cache-Control "public, max-age=31536000"
}
# Compress with gzip --best
encode {
gzip 9
}
# Serving a WebAssembly based emulator (js-dos).
file_server {
root /srv
precompressed br
index tetris.html
}
# HTTP2 server push
push / /jsdos/wdosbox.wasm
}