Please help me how to manage the reCAPTCHA implementation.
I have implemented CSP header policy. Our issue is that the reCAPTCHA code is dynamic. It changes every month.
<meta http-equiv="Content-Security-Policy" content="default-src 'none';
script-src * 'strict-dynamic' 'nonce-<nonce-value>' 'unsafe-eval';
script-src-elem 'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com/recaptcha/api2/anchor/ https://www.gstatic.com/recaptcha/releases/<dynamic-recaptcha-code>/recaptcha__en.js https://www.googletagmanager.com https://www.google-analytics.com <other-whitelisted-url>
object-src * blob:;
style-src 'self' 'unsafe-inline' 'unsafe-eval';
style-src-elem 'self' 'unsafe-inline' 'unsafe-eval' ;
img-src * data:;
media-src 'self' https://*.s3.amazonaws.com data:;
form-action *; frame-src * 'self' blob: <other-urls>;
font-src 'self' https://fonts.gstatic.com <other-font-urls>;
base-uri 'self';
connect-src *">
I also need to provide this meta tag to the devops(cloud) team(There, it cannot be dynamic). I am not sure why they need it, but values have to match in frontend and on cloud.
Please help me understand how to tackle this situation on frontend side and what to provide to them.
I tried changing the dynamic reCAPTACA url but it works for only 1 month.
Rishabh Sharma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.