Fixed issue with validating stream url
This commit is contained in:
parent
84276e2eb8
commit
adacddb97a
|
@ -50,7 +50,7 @@ func NewChatBot(ctx context.Context, streamUrl string, cfg config.ChatBot, logEr
|
||||||
}
|
}
|
||||||
|
|
||||||
func validUrl(url string) string {
|
func validUrl(url string) string {
|
||||||
valid := strings.TrimLeft(url, "http://")
|
valid := url
|
||||||
if !strings.HasPrefix(valid, "https://") {
|
if !strings.HasPrefix(valid, "https://") {
|
||||||
valid = "https://" + valid
|
valid = "https://" + valid
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue