Question

Unable to use track API due to CORS error

  • 10 June 2020
  • 0 replies
  • 44 views

  • New Participant
  • 0 replies

My website has been created using Flutter and is hosted in a subdomain (e.g. web.domain.co.uk/#/page) and on my frontend I am calling the track endpoint to send data to Mixpanel, unfortunately I get a CORS error like the following:

Access to fetch at 'https://api.mixpanel.com/track/?data=[...]' from origin 'https://web.domain.co.uk' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.

 

I checked the following support pages 

https://help.mixpanel.com/hc/en-us/articles/115004511086-CORS-errors

https://help.mixpanel.com/hc/en-us/articles/115004507486-Track-Across-Hosted-Subdomains

 

But none helped, how can I fix this problem?

 


0 replies

Be the first to reply!

Reply