Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: add deployment config option to append custom csp directives #15596

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
Nov 21, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Nov 19, 2024

Allows adding custom static CSP directives to Coder. Niche use case but makes this easier then creating a reverse proxy that has to replace the header. We want to preserve our directives, so having an append option is preferred to a "replace" option via a reverse proxy.

Closes #15118

Some notes

We do not validate the directives set. Browsers have different sets of support, so we accept any string values.

Screenshot from 2024-11-19 11-22-08

Example configuring. The format matches the header format.

coder server ... --additional-csp-policy="script-src https://example.com google.com"

# can also do it like
coder server ... --additional-csp-policy="script-src https://example.com" --additional-csp-policy="script-src https://google.com"

Allows adding custom static CSP directives to Coder. Niche use case
but makes this easier then creating a reverse proxy that has to
replace the header. We want to preserve our directives.
@Emyrk Emyrk changed the title chore: deployment config option to append custom csp directives chore: add deployment config option to append custom csp directives Nov 19, 2024
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM

@Emyrk Emyrk merged commit 5b7fa78 into main Nov 21, 2024
30 of 31 checks passed
@Emyrk Emyrk deleted the stevenmasley/addition_csp_directives branch November 21, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embedding Coder Instance - CSP Frame Ancestor Issue
3 participants