Skip to content

Commit

Permalink
Improved trailing slash trimming, #80
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnesayeed committed May 30, 2016
1 parent 311a7d6 commit 5d867bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,12 @@ func overrideFlags() {
} else {
baseURL = fmt.Sprintf("http://%s:%d%s", *host, *port, *root)
}
baseURL = strings.TrimRight(baseURL, "/")
if *proxy == "http://{HOST}[:{PORT}]{ROOT}" {
*proxy = baseURL
} else {
*proxy = strings.TrimRight(*proxy, "/")
}
*proxy = strings.TrimRight(*proxy, "/")
}

func serviceInfo() (msg string) {
Expand Down

0 comments on commit 5d867bf

Please sign in to comment.