mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-11 06:09:38 +05:00
h
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user