mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-01 02:44:31 +08:00 
			
		
		
		
	Support setting admin password and temp stream key via cli flag
This commit is contained in:
		| @ -11,6 +11,7 @@ import ( | ||||
| 	log "github.com/sirupsen/logrus" | ||||
|  | ||||
| 	"github.com/nareix/joy5/format/rtmp" | ||||
| 	"github.com/owncast/owncast/config" | ||||
| 	"github.com/owncast/owncast/core/data" | ||||
| 	"github.com/owncast/owncast/models" | ||||
| ) | ||||
| @ -87,6 +88,11 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	// Test against the temporary key if it was set at runtime. | ||||
| 	if config.TemporaryStreamKey != "" && secretMatch(config.TemporaryStreamKey, c.URL.Path) { | ||||
| 		accessGranted = true | ||||
| 	} | ||||
|  | ||||
| 	if !accessGranted { | ||||
| 		log.Errorln("invalid streaming key; rejecting incoming stream") | ||||
| 		_ = nc.Close() | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Gabe Kangas
					Gabe Kangas