mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Remove trailing slash in client api proxy (#1163)
Signed-off-by: Ashley Nelson <amn@fantashley.com>
This commit is contained in:
parent
46de400aa0
commit
c2d34422d6
1 changed files with 2 additions and 3 deletions
|
@ -58,9 +58,8 @@ var (
|
|||
)
|
||||
|
||||
func makeProxy(targetURL string) (*httputil.ReverseProxy, error) {
|
||||
if !strings.HasSuffix(targetURL, "/") {
|
||||
targetURL += "/"
|
||||
}
|
||||
targetURL = strings.TrimSuffix(targetURL, "/")
|
||||
|
||||
// Check that we can parse the URL.
|
||||
_, err := url.Parse(targetURL)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue