add e11sync-caddy
This commit is contained in:
22
pkgs/e11sync-caddy.nix
Normal file
22
pkgs/e11sync-caddy.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
writeTextFile,
|
||||
e11sync-static,
|
||||
gunicornPort ? 8002,
|
||||
}:
|
||||
writeTextFile {
|
||||
name = "e11sync-caddy";
|
||||
text = ''
|
||||
header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
||||
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 gunicornPort}
|
||||
'';
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
python3Packages,
|
||||
libmaxminddb,
|
||||
dart-sass,
|
||||
gunicornPort ? 8001,
|
||||
gunicornPort ? 8002,
|
||||
database-path ? null,
|
||||
geoip-mmdb,
|
||||
}:
|
||||
|
||||
Reference in New Issue
Block a user