fix: dashboard redirect loop
This commit is contained in:
parent
c127d34d32
commit
b380522df8
4 changed files with 4 additions and 4 deletions
2
integration/testdata/rawdata-ingress.json
vendored
2
integration/testdata/rawdata-ingress.json
vendored
|
@ -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
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue