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:
Kyle Carberry
2024-06-20 15:05:22 -05:00
committed by GitHub
parent 0793a4b35b
commit 57b38e5bb8
3 changed files with 10 additions and 3 deletions

View File

@ -19,7 +19,7 @@ func TestCSPConnect(t *testing.T) {
r := httptest.NewRequest(http.MethodGet, "/", nil)
rw := httptest.NewRecorder()
httpmw.CSPHeaders(func() []string {
httpmw.CSPHeaders(false, func() []string {
return expected
})(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(http.StatusOK)