Skip to content
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

Add CSP Headers to AtoM Responses #1646

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Add CSP Headers to AtoM Responses #1646

merged 1 commit into from
Oct 18, 2023

Conversation

sbreker
Copy link
Member

@sbreker sbreker commented Aug 22, 2023

Add Content Security Policy (CSP) headers to AtoM responses when B5 themes are enabled.

The 'app_csp_reponse_header' setting is used to switch between using 'Content-Security-Policy-Report-Only' or 'Content-Security-Policy' headers. Deleting the setting will disable CSP headers.

The 'app_csp_directives' setting is used to tweak the actual header contents.

@sbreker sbreker force-pushed the dev/csp-headers branch 5 times, most recently from e2b7984 to 9516f16 Compare August 25, 2023 15:49
@sbreker sbreker force-pushed the dev/csp-headers branch 2 times, most recently from 19169e5 to 6785ce4 Compare September 19, 2023 22:46
@FitiaHarena FitiaHarena force-pushed the dev/csp-headers branch 2 times, most recently from 9bb3718 to 0a8df9f Compare September 29, 2023 22:24
@sbreker
Copy link
Member Author

sbreker commented Oct 10, 2023

Hi @jraddaoui and @anvit - this is ready for code review.

Because of some decision changes during the course of development, it is easiest to review using the "files changed" view.

@sbreker sbreker requested a review from anvit October 10, 2023 20:38
Copy link
Contributor

@anvit anvit left a comment

Choose a reason for hiding this comment

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

This looks great! Also love that this cleans up a lot of inline styles for BS5

Copy link
Contributor

@jraddaoui jraddaoui left a comment

Choose a reason for hiding this comment

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

Great work! Just a couple of small things I think are important.

lib/filter/QubitCSPFilter.php Outdated Show resolved Hide resolved
plugins/arDominionB5Plugin/scss/_utilities.scss Outdated Show resolved Hide resolved
plugins/arDominionB5Plugin/scss/main.scss Outdated Show resolved Hide resolved
plugins/arDominionB5Plugin/scss/main.scss Outdated Show resolved Hide resolved
@sbreker
Copy link
Member Author

sbreker commented Oct 17, 2023

Hi @jraddaoui - thanks for your feedback! @FitiaHarena and I have added commits to address the items you mentioned... ready for re-review. 👍

Copy link
Contributor

@jraddaoui jraddaoui left a comment

Choose a reason for hiding this comment

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

Neat, thank you both!

Add Content Security Policy (CSP) headers to AtoM responses when B5
themes are enabled.

The 'app_csp_reponse_header' setting is used to switch between using
'Content-Security-Policy-Report-Only' or 'Content-Security-Policy'
headers. Deleting the setting will disable CSP headers.

The default setting for 'app_csp_reponse_header' is
'Content-Security-Policy' so CSP headers will be added to AtoM responses
by default.

The 'app_csp_directives' setting is used to tweak the actual header
contents. If this setting is not present CSP headers will be disabled.

Co-authored-by: FitiaHarena <[email protected]>
@sbreker sbreker merged commit d796a1f into qa/2.x Oct 18, 2023
6 checks passed
@anvit anvit added this to the 2.8.0 milestone Oct 18, 2023
@anvit anvit deleted the dev/csp-headers branch October 19, 2023 21:14
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.

4 participants