1
e11sync/pkgs/e11sync-caddyfile.nix

22 lines
418 B
Nix

{
writeTextFile,
e11sync-static,
backendPort ? 8002,
}:
writeTextFile {
name = "e11sync-caddyfile";
text = ''
header /static/CACHE/* Cache-Control "public, max-age=31536000, immutable"
route /static/* {
uri strip_prefix /static
file_server * {
root ${e11sync-static}
precompressed br gzip
}
}
reverse_proxy http://127.0.0.1:${toString backendPort}
'';
}