Skip to main content
All CollectionsIn-app SurveysTechnical Questions
What to do if you're getting a CORS error with the Wootric JS SDK
What to do if you're getting a CORS error with the Wootric JS SDK

How to solve your CORS error by setting allowing the Wootric domain in your CORS allowlist

Daniel Pitrowiski avatar
Written by Daniel Pitrowiski
Updated over 4 months ago

If you're getting a CORS error when adding the Wootric JS SDK to your web app, you need to add the Wootric domain to your CORS allowlist. This allows your server to load the Wootric SDK without blocking it due to security restrictions.

If the domain is not set, you'll receive a CORS error like in the example below:
​

Access to script at 'https://cdn.wootric.com/wootric-sdk.js' from origin '[your_url]' has been blocked by CORS policy: No 'Access=Control-Allow-Origin' header is present on the requested resource. Get https://cdn.wootric.com/wootric-sdk.js net::ERRFAILED 200

Again, this is set on the server side. To allow the Wootric domain your code will have to look like the following:

Access-Control-Allow-Origin: https://cdn.wootric.com/wootric-sdk.js

For a more thorough overview of CORS and Access-Control-Allow-Origin, we recommend this Mozilla doc:


If you have any further CORS issues, please create an issue here or email support@inmoment.com. πŸ‘©β€πŸ’»

Did this answer your question?