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 header not sent when cache hit #6

Open
MrTschi opened this issue Aug 24, 2023 · 5 comments
Open

CSP header not sent when cache hit #6

MrTschi opened this issue Aug 24, 2023 · 5 comments

Comments

@MrTschi
Copy link

MrTschi commented Aug 24, 2023

For cache-HITs, the Content-Security-Policy header is not returned to the viewer.

@Genaker
Copy link
Owner

Genaker commented Aug 24, 2023

Hi @MrTschi. If Magento sent this header, We are storing the headers. Please make var_dump() her content["header”] or something like that and check the headers stored by Magento.

@Genaker
Copy link
Owner

Genaker commented Aug 24, 2023 via email

@MrTschi
Copy link
Author

MrTschi commented Aug 26, 2023

Yes, but it seems like the CSP Header is not saved in redis.
I investigated a bit and it seems like redis-FPC is saved before CSP Headers are set.

You could say its a magento bug, but with varnish it would work.
any idea how to fix this?

@Genaker
Copy link
Owner

Genaker commented Aug 26, 2023 via email

@YehorShytikovWB
Copy link

Yes, but it seems like the CSP Header is not saved in redis. I investigated a bit and it seems like redis-FPC is saved before CSP Headers are set.

You could say its a magento bug, but with varnish it would work. any idea how to fix this?
It is Open Magento issue:
Some guys told me you need to set magento mode to production. I haven't tested it.
magento/magento2#37924

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

3 participants