ldap: strip the html from the links

This commit is contained in:
silver 2023-07-30 06:34:55 +01:00
parent 67edac3316
commit 759643b8db

View file

@ -91,7 +91,16 @@ Gonna use a priper nixos module for this
"${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" = { "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" = {
forceSSL = true; forceSSL = true;
useACMEHost = "skynet"; useACMEHost = "skynet";
root = "${inputs.skynet_ldap_frontend.defaultPackage."x86_64-linux"}"; locations."/" = {
root = "${inputs.skynet_ldap_frontend.defaultPackage."x86_64-linux"}";
# https://stackoverflow.com/a/38238001
extraConfig = ''
if ($request_uri ~ ^/(.*)\.html) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;
'';
};
}; };
}; };