WebViewer not loading on staging/dev domain

Product: @pdftron/webviewer

Product Version: 8.2.0

Please give a brief summary of your issue:
WebViewer is throwing an error when being loaded on a staging/dev site

Please describe your issue and provide steps to reproduce it:
When trying to view a PDF within the viewer from one of our staging/branch deploy sites, we are getting an error in the console:

Refused to display 'https://620e4ec1549bc30007f1cdf0--arc-react-dev.netlify.app/' in a frame because it set 'X-Frame-Options' to 'deny'.

Uncaught (in promise) Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions. See https://www.pdftron.com/kb_cross_origin for more information.

Please provide a link to a minimal sample where the issue is reproducible:
This link does not work: Not working
This link does work: Working

Both links are being served from the same location with all the same config, just different URLs

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:


Hello there.

It looks like it’s a configuration issue. As the error message suggests, you can find more information about how to setup WebViewer in a different domain going to PDFTron

The first thing I would try is to set the X-Frame-Options to something else. You can check the possible values here: X-Frame-Options - HTTP | MDN