21 lines
809 B
Text
21 lines
809 B
Text
|
|
# catcrafts.net Caddy site block
|
||
|
|
#
|
||
|
|
# The WASM app (Crafter.Graphics) needs a cross-origin-isolated context
|
||
|
|
# (SharedArrayBuffer / threads), which requires these response headers. They
|
||
|
|
# are NOT optional — without them the page loads but the runtime fails.
|
||
|
|
#
|
||
|
|
# If you already have a `catcrafts.net { ... }` block, you only need to ADD the
|
||
|
|
# three Cross-Origin-* header lines to it. This file is the complete block for
|
||
|
|
# reference. Point `root` at the host directory you bind-mount into the runner
|
||
|
|
# as /deploy (the "-v /path/to/webroot:/deploy" in the runner's config.yaml).
|
||
|
|
|
||
|
|
catcrafts.net {
|
||
|
|
root * /srv/catcrafts.net
|
||
|
|
|
||
|
|
header Cross-Origin-Opener-Policy "same-origin"
|
||
|
|
header Cross-Origin-Embedder-Policy "require-corp"
|
||
|
|
header Cross-Origin-Resource-Policy "same-origin"
|
||
|
|
|
||
|
|
encode zstd gzip
|
||
|
|
file_server
|
||
|
|
}
|