Skip check RTSP auth for localhost requests

This commit is contained in:
Alexey Khit
2022-11-29 21:04:27 +03:00
parent 140a742cee
commit 684878b4b1
+2 -1
View File
@@ -56,7 +56,8 @@ func Init() {
}
c := rtsp.NewServer(conn)
if conf.Mod.Username != "" {
// skip check auth for localhost
if conf.Mod.Username != "" && !conn.RemoteAddr().(*net.TCPAddr).IP.IsLoopback() {
c.Auth(conf.Mod.Username, conf.Mod.Password)
}
go tcpHandler(c)