nixos/mailman: remove trailing slash from /static location

Otherwise HTTP routes such as `/static/django-mailman3/css/main.css`
will cause a 404.
This commit is contained in:
Maximilian Bosch 2022-12-03 13:02:20 +01:00
parent 3dc3a628fd
commit 367897a68b
No known key found for this signature in database
GPG Key ID: 9A6EEA275CA5BE0A

View File

@ -443,7 +443,7 @@ in {
virtualHosts = lib.genAttrs cfg.webHosts (webHost: {
locations = {
${cfg.serve.virtualRoot}.extraConfig = "uwsgi_pass unix:/run/mailman-web.socket;";
"${cfg.serve.virtualRoot}/static/".alias = webSettings.STATIC_ROOT + "/";
"${removeSuffix "/" cfg.serve.virtualRoot}/static/".alias = webSettings.STATIC_ROOT + "/";
};
});
};