Syncthing: tell traefik to redirect /syncthing to /syncthing/
This commit is contained in:
parent
1b2eadecf4
commit
008f1bc36f
1 changed files with 7 additions and 2 deletions
|
|
@ -23,8 +23,8 @@
|
||||||
http = {
|
http = {
|
||||||
routers = {
|
routers = {
|
||||||
syncthing-subpath = {
|
syncthing-subpath = {
|
||||||
middlewares = [ "syncthing-strip-prefix" ];
|
middlewares = [ "syncthing-add-trailing-slash" "syncthing-strip-prefix" ];
|
||||||
rule = "PathPrefix(`/syncthing/`)";
|
rule = "PathPrefix(`/syncthing`)";
|
||||||
service = "syncthing";
|
service = "syncthing";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -32,6 +32,11 @@
|
||||||
{ url = "http://localhost:8384"; }
|
{ url = "http://localhost:8384"; }
|
||||||
];
|
];
|
||||||
middlewares.syncthing-strip-prefix.stripprefix.prefixes = "/syncthing";
|
middlewares.syncthing-strip-prefix.stripprefix.prefixes = "/syncthing";
|
||||||
|
middlewares.syncthing-add-trailing-slash.redirectRegex = {
|
||||||
|
# Going to everest/syncthing without a slash at the end breaks things
|
||||||
|
regex = "http:\/\/everest\/syncthing+$";
|
||||||
|
replacement = "http://everest/syncthing/";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue