This commit is contained in:
Laptop
2024-12-23 20:47:20 +02:00
parent 491aa6028c
commit f79bf02635
2 changed files with 8 additions and 2 deletions

View File

@@ -87,6 +87,8 @@ var TrustedProxyCheck = true
// list of ips or ip ranges of trusted proxies (check above)
var TrustedProxies = []string{}
var CodegenConfig = false
// // end of config // //
// defaults are:
@@ -425,6 +427,7 @@ func init() {
Prefork *bool
TrustedProxyCheck *bool
TrustedProxies *[]string
CodegenConfig *bool
}
err = json.Unmarshal(data, &config)
@@ -496,6 +499,9 @@ func init() {
if config.TrustedProxies != nil {
TrustedProxies = *config.TrustedProxies
}
if config.CodegenConfig != nil {
CodegenConfig = *config.CodegenConfig
}
if config.DefaultPreferences != nil {
loadDefaultPreferences(*config.DefaultPreferences)

View File

@@ -130,7 +130,7 @@ func Load(r fiber.Router) {
if *old.Player == cfg.HLSPlayer {
if cfg.ProxyStreams {
if p.ProxyStreams == "on" {
old.ProxyStreams = &cfg.ProxyStreams // true!
old.ProxyStreams = &cfg.True
} else if p.ProxyStreams == "" {
old.ProxyStreams = &cfg.False
}
@@ -155,7 +155,7 @@ func Load(r fiber.Router) {
if cfg.ProxyImages {
if p.ProxyImages == "on" {
old.ProxyImages = &cfg.ProxyImages // true!
old.ProxyImages = &cfg.True
} else if p.ProxyImages == "" {
old.ProxyImages = &cfg.False
}