1
0
Fork 0
forked from External/mediamtx

support static sources in paths with regular expressions (#824) (#2799)

This allows to proxy requests to other servers by using regular
expressions.
This commit is contained in:
Alessandro Ros 2023-12-10 21:23:41 +01:00 committed by GitHub
parent 9bb9d58cf8
commit d261bfe773
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 210 additions and 136 deletions

View file

@ -17,8 +17,9 @@ import (
// Source is a SRT static source.
type Source struct {
ReadTimeout conf.StringDuration
Parent defs.StaticSourceParent
ResolvedSource string
ReadTimeout conf.StringDuration
Parent defs.StaticSourceParent
}
// Log implements logger.Writer.
@ -31,7 +32,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
s.Log(logger.Debug, "connecting")
conf := srt.DefaultConfig()
address, err := conf.UnmarshalURL(params.Conf.Source)
address, err := conf.UnmarshalURL(s.ResolvedSource)
if err != nil {
return err
}