|
|
|
|
@ -228,6 +228,7 @@ type Cfg struct { |
|
|
|
|
// CSPReportOnlyTemplate contains the Content Security Policy Report Only template.
|
|
|
|
|
CSPReportOnlyTemplate string |
|
|
|
|
AngularSupportEnabled bool |
|
|
|
|
DisableFrontendSandboxForPlugins []string |
|
|
|
|
|
|
|
|
|
TempDataLifetime time.Duration |
|
|
|
|
|
|
|
|
|
@ -1408,6 +1409,12 @@ func readSecuritySettings(iniFile *ini.File, cfg *Cfg) error { |
|
|
|
|
cfg.CSPReportOnlyEnabled = security.Key("content_security_policy_report_only").MustBool(false) |
|
|
|
|
cfg.CSPReportOnlyTemplate = security.Key("content_security_policy_report_only_template").MustString("") |
|
|
|
|
|
|
|
|
|
disableFrontendSandboxForPlugins := security.Key("frontend_sandbox_disable_for_plugins").MustString("") |
|
|
|
|
for _, plug := range strings.Split(disableFrontendSandboxForPlugins, ",") { |
|
|
|
|
plug = strings.TrimSpace(plug) |
|
|
|
|
cfg.DisableFrontendSandboxForPlugins = append(cfg.DisableFrontendSandboxForPlugins, plug) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if cfg.CSPEnabled && cfg.CSPTemplate == "" { |
|
|
|
|
return fmt.Errorf("enabling content_security_policy requires a content_security_policy_template configuration") |
|
|
|
|
} |
|
|
|
|
|