Skip to content

Commit

Permalink
Fix double slashes in RTMP URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ioppermann committed Sep 30, 2022
1 parent a114f42 commit bbcf0ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,12 @@ func (a *api) start() error {
host = "localhost"
}

template := "rtmp://" + host + ":" + port + cfg.RTMP.App + "/{name}"
template := "rtmp://" + host + ":" + port
if cfg.RTMP.App != "/" {
template += cfg.RTMP.App
}
template += "/{name}"

if len(cfg.RTMP.Token) != 0 {
template += "?token=" + cfg.RTMP.Token
}
Expand Down

0 comments on commit bbcf0ab

Please sign in to comment.