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

Passing nonce to inline script generated by oc-client #1304

Open
joginder0007 opened this issue Jul 28, 2022 · 1 comment
Open

Passing nonce to inline script generated by oc-client #1304

joginder0007 opened this issue Jul 28, 2022 · 1 comment

Comments

@joginder0007
Copy link

Who is the bug affecting?

API consumers

What is affected by this bug?

Content security policy blocks the script

When does this occur?

Before rendering

Where on the platform does it happen?

Client

How do we replicate the issue?

Add a CSP scriptSrc='nonce=<some_value>'

Expected behavior (i.e. solution)

oc-client should have configuration for nonce to be passed

What version of OC, Node.js and OS are you using?

oc - v0.49.12 , node version - 16.15.0

Other Comments

@ricardo-devis-agullo
Copy link
Collaborator

Doesn't this get fixed by using strict-dynamic, so instead of just doing

Content-Security-Policy: script-src 'nonce-<some_value>'
adding it like this?
Content-Security-Policy: script-src 'strict-dynamic' 'nonce-<some_value>'

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

No branches or pull requests

2 participants