Content Security Policy(CSP) is an HTTP response header that lets you restrict allowed resources and domains.
If user queries or other Algolia-related network requests from your site are returning CSP (Content Security Policy) errors in the Dev Tools console, your site will be unable to connect with your Algolia application until the CSP directive is update.
Here is an example of such an error:
Refused to connect to 'https://<YOUR-APPLICATION-ID>-dsn.algolia.net/1/indexes/<YOUR-INDEX>/query?x-algolia-agent=Algoi-kev=<KEY>&x-algolia-application-id=<YOUR-APPLICATION-ID> because it violates the following Content Security Policy directive:
In order to successfully reach your Algolia application, you will need to update the connect-src
directive for your site's CSP configuration to reflect the policy outlined in this documentation:
connect-src https://*.algolia.net https://*.algolianet.com https://*.algolia.io