This commit is contained in:
soraefir
2026-05-19 22:09:36 +02:00
parent 3f57b606a0
commit af36497035
7 changed files with 155 additions and 67 deletions

View File

@@ -13,6 +13,9 @@ let
};
};
};
routerName = if subpath != null
then "${subdomain}-${lib.strings.sanitizeDerivationName subpath}"
else subdomain;
in {
paths = [{
path = "${serverCfg.dataPath}/transmission/complete";
@@ -41,8 +44,12 @@ in {
WHITELIST = "";# 127.0.0.1,::1,10.*";
# HOST_WHITELIST = "traefik-server,authentik-server,authentik-worker";
};
extraLabels = { } // (if serverCfg.containers ? authentik then {
"traefik.http.routers.${containerCfg.subdomain}.middlewares" = "authentik";
extraLabels = {
"traefik.http.routers.${routerName}.middlewares" = "transmission-rewrite";
"traefik.http.middlewares.transmission-rewrite.replacepathregex.regex=^/p2p(.*)"
"traefik.http.middlewares.transmission-rewrite.replacepathregex.replacement=/transmission/web$$1"
} // (if serverCfg.containers ? authentik then {
"traefik.http.routers.${routerName}.middlewares" = "authentik,transmission-rewrite";
} else {});
overrides = {