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

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 1, 2023

What this does

The terminal app must be hosted by the primary coderd and communicate with the workspace proxy. CORs was setup correctly, but CSP was blocking the websocket connection.

This adds the CSP connect-src header to allow websocket connections to healthy workspace proxy domains.

@Emyrk Emyrk requested a review from deansheather May 1, 2023 16:21
Copy link
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also include unhealthy proxies in case the proxy becomes healthy between page load and websocket connection.

@Emyrk Emyrk merged commit a1db825 into main May 2, 2023
@Emyrk Emyrk deleted the stevenmasley/dynamic-csp branch May 2, 2023 13:30
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants