Syncthing: use traefik as reverse proxy
This commit is contained in:
parent
47c8ca29a0
commit
88a712eac9
1 changed files with 19 additions and 0 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue