mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: allow coder.com in CSP if telemetry is enabled (#13615)
* fix: allow coder.com in CSP if telemetry is enabled * Fix control couple lint
This commit is contained in:
@ -1210,7 +1210,7 @@ func New(options *Options) *API {
|
||||
|
||||
// Add CSP headers to all static assets and pages. CSP headers only affect
|
||||
// browsers, so these don't make sense on api routes.
|
||||
cspMW := httpmw.CSPHeaders(func() []string {
|
||||
cspMW := httpmw.CSPHeaders(options.Telemetry.Enabled(), func() []string {
|
||||
if api.DeploymentValues.Dangerous.AllowAllCors {
|
||||
// In this mode, allow all external requests
|
||||
return []string{"*"}
|
||||
|
Reference in New Issue
Block a user