Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Script rewriting is not respecting script nonce attribute #1739

Open
Firegarden opened this issue Aug 29, 2021 · 0 comments
Open

Script rewriting is not respecting script nonce attribute #1739

Firegarden opened this issue Aug 29, 2021 · 0 comments

Comments

@Firegarden
Copy link

The javascript rewrites on the page are not carrying over the pre-existing nonce attribute and value.

eg. source script <script nonce="a2fa9f8ec70cf6b554e0b13dd22d41c1" src="asset/script/domready.js"></script>

Pagespeed rewrites the scripts but fails to maintain the nonce

eg. result <script data-pagespeed-no-defer>(function(){

the solution is to carry over the nonce so the page can execute the script

eg. solution <script nonce="a2fa9f8ec70cf6b554e0b13dd22d41c1" data-pagespeed-no-defer>(function(){

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant