-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Attach (recommended) or Link to PDF file
When using a "clientless VPN solution", we are experiencing a severe issue when trying to open PDFs from the server using PDF.js in several applications.
Issue occurs with any PDF file that shall be opened via web applications accessed using the "clientless VPN" solution (e.g. Palo Alto Global Protect).
Any access request to server side PDF file yields the following Error:
An error occured while loading the PDF.
Message: file origin does not macht viewer's
Note: by the nature of clientless vpn solutions, the "VPN server URL" is always added in front of the actual target server URL which then in turn tries to open / render the requested PDF via the "internal" file= command. Exemple URL composition:
https://vpn.clientless-server.url/https-5081/target.server.URL/folder/viewer.html?file=https://target.server.url/folder/requested_file.pdf
Explanation:
- https://vpn.clientless-server.url -> Host / Server URL for the clientless VPN portal page ("Viewer Origin"?)
- /https-5081/ -> depicts connection type and port for accessed server resource
- target.server.URL/folder/ -> actual target server URL / web application URL ("File Origin"?)
- folder/viewer.html?file=https://target.server.url/folder/requested_file.pdf --> Viewer Request via html for the requested pdf.
Expectation:
PDF.js should consider such clientless VPN solutions and accept PDFs for rendering/display if file origin is a modified version of viewer origin.
As the clientless server URL may change / be different for multiple customers and/or applications we cannot add execptions on a case by case basis in the PDF.js code.
Web browser and its version
EDGE 140.0.3485.94 and others
Operating system and its version
WIN11, 24H2
PDF.js version
v2.10.377;
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- sign in to clientless VPN server portal, open local web server (behind VPN tunnel) via clientless server portal page
- request/open pdf file location on local server using the full URL including the clientless server url portion
What is the expected behavior?
Expected behaviour: file is loaded / displayed same way as if local server is accessed via Intranet / client-based VPN connection
What went wrong?
Error Message:
File is not loaded / rendered
Link to a viewer
No response
Additional context
No response