# CORS error on merge api call

**URL:** <https://pdfjs.community/t/cors-error-on-merge-api-call/2817>\
**Category:** Technical Support\
**Created:** [August 30, 2023, 3:54pm UTC](https://pdfjs.community/t/cors-error-on-merge-api-call/2817 "2023-08-30T15:54:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beatriz.patriota](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@beatriz.patriota](https://pdfjs.community/u/beatriz.patriota)\
**Post date:** [August 30, 2023, 3:54pm UTC](https://pdfjs.community/t/cors-error-on-merge-api-call/2817/1 "2023-08-30T15:54:26Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**Detailed description of issue**  
Access to fetch at ‘[https://api.pdfjs.express/xfdf/merge](https://api.pdfjs.express/xfdf/merge)’ from origin ‘[domain)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

getting this error

// Process the file  
const response = await fetch(‘[https://api.pdfjs.express/xfdf/merge](https://api.pdfjs.express/xfdf/merge)’, {  
method: ‘post’,  
body: data  
}).then(resp =\> resp.json());  
const { url, key, id } = response;  
console.log(url)  
const mergedFileBlob = await fetch(url, {  
headers: {  
Authorization: key  
}  
}).then(resp =\> resp.blob())

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [September 5, 2023, 6:04pm UTC](https://pdfjs.community/t/cors-error-on-merge-api-call/2817/3 "2023-09-05T18:04:02Z")

</div>

Hello beatriz.patroita,

Thank you for your patience, we are investigating internally.

Best regards,  
Tyler Gordon

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [September 12, 2023, 5:21pm UTC](https://pdfjs.community/t/cors-error-on-merge-api-call/2817/4 "2023-09-12T17:21:03Z")

</div>

Hello beatriz.patroita,

Is this document specific?  
Can you provide the document you are testing with?

Best regards,  
Tyler Gordon
