-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCaddyfile.example
More file actions
46 lines (40 loc) · 1.06 KB
/
Caddyfile.example
File metadata and controls
46 lines (40 loc) · 1.06 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
# Example Caddyfile to use with https://caddyserver.com
#
# This assumes this project was build and the built files are found in `./build`
# and hat Kopano API via kapid is running on 127.0.0.1:8039.
0.0.0.0:8096 {
errors stderr
log stdout
tls self_signed
gzip
# Kopano Meet web app in build folder.
redir /meet /meet/r 301
rewrite /meet/r {
regexp (.*)
to /build/
}
# Avoid redirect for index.html for service worker compatibility.
rewrite /meet/index.html {
to /build/
}
rewrite /meet/ {
regexp (.*)
to /build/{1}
}
# Never cache the service worker.
header /build/service-worker.js {
Cache-Control "no-cache, no-store, must-revalidate"
Pragma "no-cache"
Expires "0"
}
# Caching for static assets.
header /build/static {
Cache-Control "max-age=86400"
}
# Fake config API.
rewrite /api/config/v1/kopano/meet/config.json /config.json
# Kopano API kapid.
proxy /api/gc/ 127.0.0.1:8039 {
transparent
}
}