forked from SableClient/Sable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
28 lines (22 loc) · 743 Bytes
/
Caddyfile
File metadata and controls
28 lines (22 loc) · 743 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
{
servers {
protocols h1 h2c
}
}
:8080 {
root * /app
# Enable on-the-fly compression for things not pre-compressed
encode zstd gzip
file_server {
precompressed br
}
try_files {path} /index.html
# Content-hashed assets can be cached indefinitely — the filename changes on every build.
header /assets/* Cache-Control "public, max-age=31536000, immutable"
# Workbox SW must be revalidated on every load so the browser picks up updates.
header /sw.js Cache-Control "no-cache"
# index.html must not be cached so the browser always gets the latest app shell.
header /index.html Cache-Control "no-cache"
# Required for Sentry browser profiling (JS Self-Profiling API)
header Document-Policy "js-profiling"
}