Я пытаюсь интегрировать recaptcha v2 в мой проект Codeigniter 3, но он не работает с сообщением об ошибке в консоли:
Refused to load the script 'https://www.google.com/recaptcha/api.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://connect.facebook.net https://cdn.datatables.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://code.jquery.com https://cdn.jsdelivr.net". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Я просматривал, но не повезло.
это последнее CSP был я попробую:
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://*.gstatic.com/ https://*.google.com/ https://*.googleapis.com https://ssl.google-analytics.com https://connect.facebook.net https://cdn.datatables.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://code.jquery.com https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.gstatic.com/ https://*.google.com/ https://*.googleapis.com https://ssl.google-analytics.com https://connect.facebook.net https://cdn.datatables.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://code.jquery.com https://cdn.jsdelivr.net; frame-src 'self' https://*.gstatic.com/ https://*.google.com/ https://*.googleapis.com https://ssl.google-analytics.com https://connect.facebook.net https://cdn.datatables.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://code.jquery.com https://cdn.jsdelivr.net; script-src-elm 'self' https://ssl.google-analytics.com https://connect.facebook.net https://cdn.datatables.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://code.jquery.com https://cdn.jsdelivr.net; ">