WebViewer Version: 8.2.1
Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? NA
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? Yes, Chrome (latest - v99)
Is your issue related to a front-end framework? VueJs
Is your issue related to annotations? No
Please give a brief summary of your issue:
PDF files fail to load in WebViewer due to CORS error
Please describe your issue and provide steps to reproduce it:
I have embedded the WebViewer in my VueJs frontend. The viewer itself load alright.
Now I’m trying to load some documents into it, by providing URIs from my (FastAPI) app server.
The app server has all CORS policies correctly configured (yes, it is on the same IP, but different port).
Chrome browser produces the below error message, while the documents display fine in Safari.
My sense is that this is related to the fact that the webviewer is embedded in an
iframe, and Chrome, with its tight security policies, does not like that?
Access to fetch at 'http://192.168.99.145:8000/v1/.../file' from origin 'http://192.168.99.145:8080' 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.