mirror of
https://github.com/prymitive/karma
synced 2026-09-04 11:27:19 +00:00
Merge pull request #399 from prymitive/fix-suburi-proxy
fix(proxy): check for trailing slash on listen.prefix when proxy is on
This commit is contained in:
@@ -15,7 +15,11 @@ import (
|
||||
)
|
||||
|
||||
func proxyPathPrefix(name string) string {
|
||||
return fmt.Sprintf("%sproxy/alertmanager/%s", config.Config.Listen.Prefix, name)
|
||||
maybeSlash := ""
|
||||
if !strings.HasSuffix(config.Config.Listen.Prefix, "/") {
|
||||
maybeSlash = "/"
|
||||
}
|
||||
return fmt.Sprintf("%s%sproxy/alertmanager/%s", config.Config.Listen.Prefix, maybeSlash, name)
|
||||
}
|
||||
|
||||
func proxyPath(name, path string) string {
|
||||
|
||||
Reference in New Issue
Block a user