Remove trailing slash in client api proxy (#1163)

Signed-off-by: Ashley Nelson <amn@fantashley.com>
main
Ashley Nelson 2020-06-25 06:27:09 -05:00 committed by GitHub
parent 46de400aa0
commit c2d34422d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -58,9 +58,8 @@ var (
) )
func makeProxy(targetURL string) (*httputil.ReverseProxy, error) { func makeProxy(targetURL string) (*httputil.ReverseProxy, error) {
if !strings.HasSuffix(targetURL, "/") { targetURL = strings.TrimSuffix(targetURL, "/")
targetURL += "/"
}
// Check that we can parse the URL. // Check that we can parse the URL.
_, err := url.Parse(targetURL) _, err := url.Parse(targetURL)
if err != nil { if err != nil {