View PDF files from WebDAV server using PDFView

I have a webDAV web server hosting a few PDF files, this server runs on the same machine as the gateway.

I can access these PDFs using a browser, but if I copy the URL into the target field of the PDFView component it fails to load.

Any ideas?

Debugger:
“Access to fetch at ‘http://127.0.0.1:8080/test.pdf’ from origin ‘http://192.168.10.11:8088’ 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.”

Okay so what blocks you is CORS: https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

To enable this you need to download the CORS ISS Module:
https://www.iis.net/downloads/microsoft/iis-cors-module#additionalDownloads

Then configure the web.config file in the directory:
https://blogs.iis.net/iisteam/getting-started-with-the-iis-cors-module

Then you can share files between webservers