Network failure & CORS errors

,

Product: PDFTron

Product Version: ‘8.6.1’
Build: Ni8zMC8yMDIyfDM4OGZiODQyMA

Please give a brief summary of your issue:
I am using vue 3 stack + webviewer. Everything is fine on the personal server, but when deploying to hosting, I ran into a problem.

Please describe your issue and provide steps to reproduce it:
Functionality: on domain: domain.com web application for viewing pdf files stored on the server and received via api from api.domain.com. But for some reason, when I try to view pdf through webviewer, I get: Network failure. Help who faced similar.

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Would you be able to provide the link to your WebViewr webapp so we can debug it there?

https://mybook.dniprorada.gov.ua/test/144

It looks like the CORS issue, you need to add CORS support in your file server like described there PDFTron Systems Inc. | Documentation
The from this URL is not accessible https://api.mybook.dniprorada.gov.ua/uploads/5c756ade-c86c-4eef-a61a-ce30ea4305d2Redko_spain_1kl.pdf from WebViewer because there is not “Access-Control-Allow-Origin” header is set in the HTTP calls. And you may need to add headers like these:

Access-Control-Allow-Methods: GET, HEAD
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers:  Accept-Ranges, Content-Length, Content-Range