Skip to content

chore: Allow cors requests to workspace proxies for latency checks #7484

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 5 commits into from
May 10, 2023
Merged
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
Fix typo
  • Loading branch information
Emyrk committed May 10, 2023
commit 454a5c045575e316da9c48c777ee10ba39580fda
2 changes: 1 addition & 1 deletion coderd/httpmw/csp.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func CSPHeaders(websocketHosts func() []string) func(next http.Handler) http.Han
if len(extraConnect) > 0 {
for _, extraHost := range extraConnect {
cspSrcs.Append(cspDirectiveConnectSrc, fmt.Sprintf("wss://%[1]s ws://%[1]s", extraHost))
// We also require this to make http/https requests to the workspace proxy for latenecy checking.
// We also require this to make http/https requests to the workspace proxy for latency checking.
cspSrcs.Append(cspDirectiveConnectSrc, fmt.Sprintf("https://%[1]s http://%[1]s", extraHost))
}
}
Expand Down