Merge branch 'mikesir87-128-replace-underscores-in-urls'
This commit is contained in:
@@ -38,7 +38,7 @@ func getTargetInfo(vars map[string]string, req *http.Request) (string, string) {
|
||||
|
||||
if strings.HasPrefix(node, "pwd") {
|
||||
// Node is actually an ip, need to convert underscores by dots.
|
||||
ip := strings.Replace(strings.TrimPrefix(node, "pwd"), "_", ".", -1)
|
||||
ip := strings.Replace(strings.TrimPrefix(node, "pwd"), "-", ".", -1)
|
||||
|
||||
if net.ParseIP(ip) == nil {
|
||||
// Not a valid IP, so treat this is a hostname.
|
||||
@@ -143,7 +143,7 @@ func NewSSLDaemonHandler() http.Handler {
|
||||
node := v["node"]
|
||||
if strings.HasPrefix(node, "pwd") {
|
||||
// Node is actually an ip, need to convert underscores by dots.
|
||||
ip := strings.Replace(strings.TrimPrefix(node, "pwd"), "_", ".", -1)
|
||||
ip := strings.Replace(strings.TrimPrefix(node, "pwd"), "-", ".", -1)
|
||||
|
||||
if net.ParseIP(ip) == nil {
|
||||
// Not a valid IP, so treat this is a hostname.
|
||||
|
||||
Reference in New Issue
Block a user