-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile-v1
41 lines (34 loc) · 974 Bytes
/
Caddyfile-v1
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
https://slightly.erayd.net {
root /websites/slightly.erayd.net/public
log /websites/slightly.erayd.net/logs/access.log
errors /websites/slightly.erayd.net/logs/error.log
gzip
tls /websites/slightly.erayd.net/slightly.pem /websites/slightly.erayd.net/slightly.key
browse /dist
header /dist {
Access-Control-Allow-Origin *
Cache-Control "public,max-age=2592000,immutable"
}
header /dist/version Cache-Control "public,max-age=3600"
rewrite {
if {path} not_ends_with .md
to {path} {path}/ /
}
rewrite {
if {path} ends_with .md
to /x-md-content/{uri}
}
proxy /x-md-content/ {
without /x-md-content
upstream 127.0.0.2:81
header_downstream X-Robots-Tag noindex
header_downstream -Server ""
}
}
127.0.0.2:81 {
root /websites/slightly.erayd.net/public
rewrite {
if {path} ends_with .md
to {path} /404.md
}
}