1
Info: Cross domain, same origin issues with DocumentViewer
Announcement by Cem Alacayir - 8/16/2024 at 9:08 PM
Employee Post
DocumentUltimate v7.0.15 fixes cross domain, same origin issues:

Version 7.0.15 - August 17, 2024

  • Fixed: Error when DocumentViewer is rendered in cross-domain frame:
    Uncaught DOMException: Failed to read a named property 'matchMedia' from 'Window':
    Blocked a frame with origin "http://development"; from accessing a cross-origin frame.

  • Improved: Show explanatory error message when DocumentViewer host page is opened via local HTML file:
    Viewer cannot be loaded when you load the HTML file locally (i.e. with a file:// URL).
    This causes CORS errors due to JavaScript module (.mjs) security requirements of the browser.
    You need to run through a local or remote web server (i.e. with a http:// or https:// URL).

  • Improved: Show explanatory error message when DocumentViewer host page and iframe is not same origin for some reason:
    Viewer cannot be loaded because the iframe and the iframe's parent document are not "Same Origin".
    If you did set a custom libraryPath, ensure it is same origin as this host page
    or adjust your server's CORS settings to allow cross-domain access.

Reply to Thread