fix: always add leading slash to routes (#397)

This commit is contained in:
Brendan Le Glaunec
2026-02-03 10:12:23 +01:00
committed by GitHub
parent f93f9c9780
commit d16443109a
4 changed files with 89 additions and 12 deletions
+1 -4
View File
@@ -119,10 +119,7 @@ func formatStream(stream cameradar.Stream) string {
}
func formatRTSPURL(stream cameradar.Stream) string {
path := stream.Route()
if path != "" && !strings.HasPrefix(path, "/") {
path = "/" + path
}
path := "/" + strings.TrimLeft(strings.TrimSpace(stream.Route()), "/")
credentials := ""
if stream.Username != "" || stream.Password != "" {