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

CSP interferes with var-dumper #339

Open
pauljura opened this issue Mar 5, 2024 · 1 comment
Open

CSP interferes with var-dumper #339

pauljura opened this issue Mar 5, 2024 · 1 comment

Comments

@pauljura
Copy link

pauljura commented Mar 5, 2024

After installing this and setting a strict Content Security Policy, I noticed that the Twig dump() function no longer shows pretty HTML-formatted output. It still outputs, but it doesn't have any styling or javascript toggles, due to inline script and inline styles being blocked.

Is there some way to detect when a dump() is included in the response, and disable CSP just for the current request?

I found a similar issue here symfony/symfony#29084 but the solution there doesn't seem to work when this bundle is installed.

Thanks

@Seldaek
Copy link
Member

Seldaek commented Mar 11, 2024

Right, it'd probably make sense to look at the DumpDataCollector in dev environment, and do something similar to symfony/symfony@bbb4d9f - if someone wants to PR this.. :)

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