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 nonce #76

Open
heddn opened this issue Apr 21, 2022 · 1 comment
Open

CSP nonce #76

heddn opened this issue Apr 21, 2022 · 1 comment

Comments

@heddn
Copy link

heddn commented Apr 21, 2022

Could the inline script be added with a nonce? Maybe optional integration with spatie/laravel-csp or some means for me to insert a nonce to the inline script. The markup is pretty hard-coded. If the view were moved out of inline blade markup into an actual blade.view, then I'd have some more flexibility.

@moijafcor
Copy link

Please take a look at #95.

You could either "monkey-patch" your copy at vendor/biscolab/laravel-recaptcha/src/ReCaptchaBuilderV3.php meanwhile a permanent solution is implemented by the package's maintainer(s), or just create your class inside your app's namespace MyCustomReCaptchaBuilderV3 extends ReCaptchaBuilder adapting the ReCaptchaBuilderV3 with the nonce code for the htmlScriptTagJsApi() method.

The latter option is more convoluted because of the plumbing this package uses instantiating variables and JS resources.

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