-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathCaddyfile
74 lines (59 loc) · 1.28 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
62
63
64
65
66
67
68
69
70
71
72
73
74
{
auto_https off
admin off
}
(static) {
@static_path {
path /static/* /favicon* /manifest.json
}
@static_asset {
file
path /static/* /favicon* /manifest.json
}
# static assets configure cache headers and do not check for changes
header @static_asset {
Cache-Control "public, max-age=31536000"
# remove Last-Modified header
-Last-Modified
}
}
(notstatic) {
@not_static_path {
not path /static/*
}
@not_static_assets {
not path /static/*
}
header @not_static_assets {
Cache-Control "no-cache, no-transform, must-revalidate"
}
}
:80 {
import static
import notstatic
redir /.well-known/security.txt https://www.gitpod.io/.well-known/security.txt permanent
redir /environment-variables /settings/ permanent
rewrite /schemas/gitpod-schema.json /static/schemas/gitpod-schema.json
# avoid multiple redirects to return a static html file to not loose
# window.opener and brake the automatic closing of the auth redirect
rewrite /complete-auth /complete-auth/index.html
header -Server
root * /www
file_server {
precompressed gzip br
}
handle @static_path {
try_files {path}
}
handle @not_static_path {
try_files {path} {path}/ /index.html
}
handle {
respond "404 - Not Found" 404
}
}
# health-check
:8080 {
respond /live 200
respond /ready 200
}