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