Fix: path can be / or empty

This commit is contained in:
Mathieu Lecarme 2022-06-17 10:51:23 +02:00 committed by lperdereau
parent e57150ae1d
commit 1d7bce7064

View file

@ -143,7 +143,7 @@ func (l *LokiSource) buildUrl() error {
}
buff.WriteString("://")
buff.WriteString(u.Host)
if u.Path == "" {
if u.Path == "" || u.Path == "/" {
buff.WriteString("/loki/api/v1/tail")
} else {
buff.WriteString(u.Path)