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

#1852 Add Observer to remove CSP headers from Adyen requests #2059

Merged

Conversation

josh-carter
Copy link
Contributor

Description

  • Adds observer on core event ``
  • Checks action name, if its an Adyen request, remove the CSP headers

Tested scenarios

  • Tested all payment flows, currently working in production for a client
  • Tested notifications no longer fail when using a large amount of CSP rules

Fixes
#1852

@sonarcloud
Copy link

sonarcloud bot commented May 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@RokPopov
Copy link
Contributor

Hi @josh-carter,

Thank you for this PR and apologies for the late reply.
If I understand this correctly, it seems like the observer is clearing the CSP headers from all the responses where the requests came from Adyen?
Ideally, we would like to limit this functionality only to the webhook responses.

Could I get your thoughts on the above?

Cheers,
Rok

@josh-carter
Copy link
Contributor Author

Hi @RokPopov

Yep as i mentioned in the issue #1852 I think a better approach would be to make the routes that it removes the CSP headers from configurable via DI, i could update this PR to include a better more maintainable approach asap

@leandromagnabosco leandromagnabosco requested a review from a team July 25, 2023 15:11
@peterojo
Copy link
Contributor

peterojo commented Apr 10, 2024

Hi @josh-carter!
Sorry for the long delay, and thanks for your solution.
Would you be able to update your PR to only remove the headers for the webhook endpoint?

@RokPopov RokPopov mentioned this pull request Apr 16, 2024
@RokPopov RokPopov merged commit 28e804b into Adyen:develop Apr 19, 2024
8 of 10 checks passed
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.

3 participants