adobe blocked by CORS policy but URL is in allowed domain for API settings?

New Here ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Im having some issues with the embed API. the PDF pops up and then instantly disappears when I check dev tools I see the below error.

 

Access to fetch at 'https://viewlicense.adobe.io/viewsdklicense/jwt' from origin 'https://download.militaryonesource.mil' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'.

 

But I'm not sure why i am getting this error as the allowed domain is set to allow this URL  (download.militaryonesource.mil) in the API config.

 

 

<div id="adobe-dc-view" style="width: 800px;">
</div>
<script type="text/javascript">
const queryString = window.location.search;
const params = new URLSearchParams(document.location.search);
document.addEventListener("adobe_dc_view_sdk.ready", function() {
var adobeDCView = new AdobeDC.View({
clientId: "SOMECLIENTID",
divId: "adobe-dc-view"
});
adobeDCView.previewFile({
content: {
location: {
}
},
metaData: {
fileName: "SPA.pdf"
}
}, {
embedMode: "IN_LINE"
});
});
</script>

 

TOPICS
PDF Embed API

Views

78

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 27, 2022 Apr 27, 2022

Copy link to clipboard

Copied

LATEST

Is this online where I can take a look?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources