Skip to main content
Participant
April 26, 2022
Question

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

  • April 26, 2022
  • 2 replies
  • 3551 views

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>

 

This topic has been closed for replies.

2 replies

Participant
February 14, 2023

It's likely the same issue here. I created a new project with the same domain settings as a working project, but we often encounter the error "domain is not authorized," and sometimes we see a CORS error.

https://sanofi-campaign.wenk-media.com/Medical-News/mCRPC-01.

Raymond Camden
Community Manager
Community Manager
February 14, 2023

Testing your link, I get the error where the client id is not valid. So can you share a screenshot of your credentials from the dashboard, specifically the host name you specified? If you specified www.wenk-media.com, note that sanofi-campaign is a different subdomain and would not work. You would need to make a new client id and consider using just wenk-media.com.

Participant
February 15, 2023

Please find attached a screenshot of the dashboard. The domain setting used is wenk-media.com. It seems that only the newly created project is not functioning properly, while the project created in July 2022 with the same domain setting is working fine.

 

Raymond Camden
Community Manager
Community Manager
April 27, 2022

Is this online where I can take a look?

Participant
February 13, 2023

I am having this same issue, everything was working for a year+ and then stopped recently with this CORS error 

 

Raymond Camden
Community Manager
Community Manager
February 13, 2023

As I asked the other person, is this online where I can see?