nixos/homer: add caching headers and compression to caddy vhost (#529447)
This commit is contained in:
@@ -169,11 +169,25 @@ in
|
||||
enable = true;
|
||||
virtualHosts."${cfg.virtualHost.domain}".extraConfig = ''
|
||||
root * ${cfg.package}
|
||||
file_server
|
||||
encode zstd gzip
|
||||
|
||||
@immutable path /resources/*
|
||||
header @immutable Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
@html not path /resources/*
|
||||
header @html Cache-Control "no-store"
|
||||
|
||||
header {
|
||||
-ETag
|
||||
-Last-Modified
|
||||
}
|
||||
|
||||
handle_path /assets/config.yml {
|
||||
root * ${configFile}
|
||||
file_server
|
||||
}
|
||||
|
||||
file_server
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user