-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
41 lines (33 loc) · 775 Bytes
/
Caddyfile
File metadata and controls
41 lines (33 loc) · 775 Bytes
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
(slightly) {
root ./public
file_server
@naked_path {
path_regexp (^|/)[^./]+$
file {
try_files {path}.md
}
}
@md_path {
path_regexp \.md$
file {
try_files {path} /404.md
}
}
rewrite @naked_path /
rewrite @md_path {http.matchers.file.relative}
header /dist/* Access-Control-Allow-Origin *
route {
header /dist/* Cache-Control "public,max-age=2592000,immutable"
header /dist/version Cache-Control "public,max-age=3600"
}
file_server /dist/* browse
handle_errors {
rewrite @md_path {http.matchers.file.relative}
rewrite * /
file_server
}
}
slightly.l.erayd.net {
tls internal
import slightly
}