Syncthing: use traefik as reverse proxy

This commit is contained in:
Toast 2023-08-31 23:27:35 +02:00
parent 47c8ca29a0
commit 88a712eac9

View file

@ -16,4 +16,23 @@
}; };
}; };
}; };
# Set up traefik as the reverse proxy for syncthing
services.traefik = {
dynamicConfigOptions = {
http = {
routers = {
syncthing-subpath = {
middlewares = [ "syncthing-strip-prefix" ];
rule = "PathPrefix(`/syncthing/`)";
service = "syncthing";
};
};
services.syncthing.loadBalancer.servers = [
{ url = "http://localhost:8384"; }
];
middlewares.syncthing-strip-prefix.stripprefix.prefixes = "/syncthing";
};
};
};
} }