diff options
-rw-r--r-- | main.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -99,12 +99,13 @@ func main() { if h, _, err := net.SplitHostPort(host); err == nil { host = h } - // Use "-" instead of "." in the domain to make it a single token. - domainParts := strings.ReplaceAll(host, ".", "-") + // Use "_" instead of "." in the domain to make it a single token. + domainParts := strings.ReplaceAll(host, ".", "_") // Process path component path := strings.TrimPrefix(r.URL.Path, "/") - subjectPath := strings.ReplaceAll(path, "/", ".") + // Replace all "." with "_" and then all "/" with ".". + subjectPath := strings.ReplaceAll(strings.ReplaceAll(path, ".", "_"), "/", ".") // Build final subject subjectBase := "http" |