Skip to content

chore: Dynamic CSP connect-src to support terminals connecting to workspace proxies #7352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove prints
  • Loading branch information
Emyrk committed May 1, 2023
commit ba048b0dc7e02ae6ec9c22c7285ecdffb0e390b6
6 changes: 3 additions & 3 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,10 @@ func New(options *Options) *API {
// browsers, so these don't make sense on api routes.
cspMW := httpmw.CSPHeaders(func() []string {
if f := api.HealthyWorkspaceProxyHosts.Load(); f != nil {
// By default we do not add extra websocket connections to the CSP
return []string{}
return (*f)()
}
return nil
// By default we do not add extra websocket connections to the CSP
return []string{}
})
r.NotFound(cspMW(compressHandler(http.HandlerFunc(api.siteHandler.ServeHTTP))).ServeHTTP)
return api
Expand Down
1 change: 0 additions & 1 deletion enterprise/coderd/proxyhealth/proxyhealth.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ func (p *ProxyHealth) storeProxyHealth(statuses map[uuid.UUID]ProxyStatus) {
}
}

fmt.Println("healthyHosts", healthyHosts)
// Store the statuses in the cache before any other quick values.
p.cache.Store(&statuses)
p.heathyHosts.Store(&healthyHosts)
Expand Down