fix path for transmission if not in download

This commit is contained in:
Noah Masur 2024-03-30 13:48:10 -04:00
parent eb6b72a25c
commit 0de2c429f2

View File

@ -40,15 +40,15 @@
};
# Create reverse proxy for web UI
caddy.routes = lib.mkAfter [{
group =
if (config.hostnames.download == config.hostnames.transmission) then
"download"
else
"transmission";
caddy.routes = let
# Set if the download domain is the same as the Transmission domain
useDownloadDomain = config.hostnames.download
== config.hostnames.transmission;
in lib.mkAfter [{
group = if useDownloadDomain then "download" else "transmission";
match = [{
host = [ config.hostnames.transmission ];
path = [ "/transmission*" ];
path = if useDownloadDomain then [ "/transmission*" ] else null;
}];
handle = [{
handler = "reverse_proxy";