fix: dashboard redirect loop

This commit is contained in:
Ludovic Fernandez 2019-12-24 17:36:04 +01:00 committed by Traefiker Bot
parent c127d34d32
commit b380522df8
4 changed files with 4 additions and 4 deletions

View file

@ -60,7 +60,7 @@
"middlewares": { "middlewares": {
"dashboard_redirect@internal": { "dashboard_redirect@internal": {
"redirectRegex": { "redirectRegex": {
"regex": "^(http:\\/\\/[^:]+(:\\d+)?)/$", "regex": "^(http:\\/\\/[^:\\/]+(:\\d+)?)\\/$",
"replacement": "${1}/dashboard/", "replacement": "${1}/dashboard/",
"permanent": true "permanent": true
}, },

View file

@ -25,7 +25,7 @@
"middlewares": { "middlewares": {
"dashboard_redirect": { "dashboard_redirect": {
"redirectRegex": { "redirectRegex": {
"regex": "^(http:\\/\\/[^:]+(:\\d+)?)/$", "regex": "^(http:\\/\\/[^:\\/]+(:\\d+)?)\\/$",
"replacement": "${1}/dashboard/", "replacement": "${1}/dashboard/",
"permanent": true "permanent": true
} }

View file

@ -57,7 +57,7 @@
"middlewares": { "middlewares": {
"dashboard_redirect": { "dashboard_redirect": {
"redirectRegex": { "redirectRegex": {
"regex": "^(http:\\/\\/[^:]+(:\\d+)?)/$", "regex": "^(http:\\/\\/[^:\\/]+(:\\d+)?)\\/$",
"replacement": "${1}/dashboard/", "replacement": "${1}/dashboard/",
"permanent": true "permanent": true
} }

View file

@ -86,7 +86,7 @@ func (i *Provider) apiConfiguration(cfg *dynamic.Configuration) {
cfg.HTTP.Middlewares["dashboard_redirect"] = &dynamic.Middleware{ cfg.HTTP.Middlewares["dashboard_redirect"] = &dynamic.Middleware{
RedirectRegex: &dynamic.RedirectRegex{ RedirectRegex: &dynamic.RedirectRegex{
Regex: `^(http:\/\/[^:]+(:\d+)?)/$`, Regex: `^(http:\/\/[^:\/]+(:\d+)?)\/$`,
Replacement: "${1}/dashboard/", Replacement: "${1}/dashboard/",
Permanent: true, Permanent: true,
}, },