Open eliasjtg opened 3 years ago
My server has Content Security Policy enabled, i want to initialize js code with a nonce to allow recaptcha script execution.
Google docs recommend use nonce: FAQ
Can be added a function called initJsNonce() or related?
/** * @param string $nonce * @return string */ public function initJsNonce(string $nonce): string { return '<script src="' . $this->origin . '/api.js?render=' . $this->sitekey . '" nonce="'.$nonce.'"></script>'; }
As workaround how can add/override RecaptchaV3 class to add this?
I'm not familiarized with Laravel Container to do that, if anyone can help me I would appreciate.
My server has Content Security Policy enabled, i want to initialize js code with a nonce to allow recaptcha script execution.
Google docs recommend use nonce: FAQ
Can be added a function called initJsNonce() or related?
As workaround how can add/override RecaptchaV3 class to add this?
I'm not familiarized with Laravel Container to do that, if anyone can help me I would appreciate.