electra/hydra: add a simple redirect for hydra badges

This commit is contained in:
Gabriel Fontes
2022-10-16 02:24:18 -03:00
parent b72bd7a2f0
commit 3fb7c6dff7
+6 -2
View File
@@ -76,8 +76,12 @@ in
"hydra.m7.rs" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass =
"http://localhost:${toString config.services.hydra.port}";
locations = {
"~* ^/shield/([^\\s]*)".return =
"302 https://img.shields.io/endpoint?url=https://hydra.m7.rs/$1/shield";
"/".proxyPass =
"http://localhost:${toString config.services.hydra.port}";
};
};
};
};