# Custom domain creates CORS issue

**URL:** <https://community.fliplet.com/t/custom-domain-creates-cors-issue/686>\
**Category:** Get Help\
**Tags:** cors, csv, papaparse, custom-domain\
**Created:** [September 6, 2024, 9:54am UTC](https://community.fliplet.com/t/custom-domain-creates-cors-issue/686 "2024-09-06T09:54:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyFromLeeds](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@AndyFromLeeds](https://community.fliplet.com/u/AndyFromLeeds)\
**Post date:** [September 6, 2024, 9:54am UTC](https://community.fliplet.com/t/custom-domain-creates-cors-issue/686/1 "2024-09-06T09:54:00Z")

</div>

Hi,

I recently had a custom domain applied to my application but it has had the effect of causing CORS issues. My app uses papaparse to load in a csv stored in file manager … but now because my app is [https://xxx.com](https://xxx.com) and the file is found at [https://api.fliplet.com](https://api.fliplet.com) I get cross origin issues:

Access to XMLHttpRequest at '[https://api.fliplet.com/v1/media/files/xxx/xxx/Test.csv](https://api.fliplet.com/v1/media/files/xxx/xxx/Test.csv) from origin ‘[https://xxx.com](https://xxx.com)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Please help.

Thanks  
Andy

---

<div class="post-metadata">

**Author:** ![Deb](https://dub1.discourse-cdn.com/flex017/user_avatar/community.fliplet.com/deb/32/159_2.png) [@Deb](https://community.fliplet.com/u/Deb)\
**Post date:** [September 18, 2024, 7:54am UTC](https://community.fliplet.com/t/custom-domain-creates-cors-issue/686/2 "2024-09-18T07:54:47Z")

</div>

Hi Andy,

We have recently released a bug fix for this where if you used our authentication endpoint from a live app (not from inside Fliplet Studio) it will return a file with your custom domain.

Try to use, before giving it to Papa Parse:

```js
var authenticatedUrl = Fliplet.Media.authenticate(mediaFile.url);

```

Documentation: [Media JS APIs | Fliplet Developers Documentation](https://developers.fliplet.com/API/fliplet-media.html#authentication)

Thanks,  
Deb
