Skip to main content
Participant
Apr 26, 2022 9:37 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

11 replies

Participant
Feb 14, 2023 4:13 AM UTC

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.

Translate
Raymond Camden
Community Manager
Community Manager
Feb 14, 2023 3:01 PM UTC

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.

Translate
Participant
Feb 15, 2023 6:14 AM UTC

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.

 

Translate
Raymond Camden
Community Manager
Community Manager
Apr 27, 2022 3:51 PM UTC

Is this online where I can take a look?

Translate
Participant
Feb 13, 2023 3:41 PM UTC

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

 

Translate
Raymond Camden
Community Manager
Community Manager
Feb 13, 2023 4:30 PM UTC

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

Translate