rollbar / rollbar-php-wordpress

Official WordPress plugin from Rollbar, Inc.
https://rollbar.com/
GNU General Public License v2.0
15 stars 20 forks source link

Add nonce attribute to client side script #87

Open devowhippit opened 5 years ago

devowhippit commented 5 years ago

I can see there is some code to handle adding a nonce attribute to the inline script in the vendor Rollbar PHP (https://github.com/rollbar/Rollbar-PHP) helper script below;

https://github.com/rollbar/rollbar-php-wordpress/blob/7582a2a28b2fb7e0715cefbcd977fd94784a93e2/vendor/rollbar/rollbar/src/RollbarJsHelper.php#L27

However, it doesn't appear as though there is any header information passed to the helper function that would enable this...

https://github.com/rollbar/rollbar-php-wordpress/blob/7582a2a28b2fb7e0715cefbcd977fd94784a93e2/src/Plugin.php#L361

... or at least it isn't apparent to me. Is there some way to configure adding the nonce to the attribute?