Fix: path can be / or empty
This commit is contained in:
parent
e57150ae1d
commit
1d7bce7064
|
@ -143,7 +143,7 @@ func (l *LokiSource) buildUrl() error {
|
||||||
}
|
}
|
||||||
buff.WriteString("://")
|
buff.WriteString("://")
|
||||||
buff.WriteString(u.Host)
|
buff.WriteString(u.Host)
|
||||||
if u.Path == "" {
|
if u.Path == "" || u.Path == "/" {
|
||||||
buff.WriteString("/loki/api/v1/tail")
|
buff.WriteString("/loki/api/v1/tail")
|
||||||
} else {
|
} else {
|
||||||
buff.WriteString(u.Path)
|
buff.WriteString(u.Path)
|
||||||
|
|
Loading…
Reference in a new issue