mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 23:40:35 +01:00
bugfix: trim relative slash incorrectly in apiBuilder.Party
Former-commit-id: 9c41facfe3b99138e80de6f12f6fea191e53cf60
This commit is contained in:
parent
1ffe4479f7
commit
e466765842
|
@ -214,8 +214,8 @@ func (api *APIBuilder) Party(relativePath string, handlers ...context.Handler) P
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is checked later on but for easier debug is better to do it here:
|
// this is checked later on but for easier debug is better to do it here:
|
||||||
if api.relativePath[0] == '/' && relativePath[0] == '/' {
|
if api.relativePath[len(api.relativePath)-1] == '/' && relativePath[0] == '/' {
|
||||||
parentPath = parentPath[1:] // remove first slash if parent ended with / and new one started with /.
|
relativePath = relativePath[1:] // remove first slash if parent ended with / and new one started with /.
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it's subdomain then it has priority, i.e:
|
// if it's subdomain then it has priority, i.e:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user