# CORS error message on api merge call

**URL:** <https://pdfjs.community/t/cors-error-message-on-api-merge-call/2828>\
**Category:** Bug Reports\
**Created:** [September 4, 2023, 2:51pm UTC](https://pdfjs.community/t/cors-error-message-on-api-merge-call/2828 "2023-09-04T14:51:21Z")\
**Posts on this page:** 1\
**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:** [September 4, 2023, 2:51pm UTC](https://pdfjs.community/t/cors-error-message-on-api-merge-call/2828/1 "2023-09-04T14:51:21Z")

</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())
