Support » Plugin: HTTP Headers » Access problem

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dimitar Ivanov

    (@zinoui)

    It may be CSP instead of CORS issue.
    What’s the actual error message?

    Thread Starter gottfrieds

    (@gottfrieds)

    This is the error message:

    Uncaught (in promise) Error: file origin does not match viewer’s
    at validateFileURL (app.js:1429)
    at webViewerInitialized (app.js:1471)

    Plugin Author Dimitar Ivanov

    (@zinoui)

    It doesn’t looks like an CSP nor an CORS issue.
    Note that the HTTP Headers plugin can’t change the origin of a document. So, can’t help if your code has a similar check:

    if (fileOrigin !== viewerOrigin) {
        throw new Error('file origin does not match viewer\'s');
    }

    P.S. If this error comes from the pdf.js library, you may need to add your trusted origins to HOSTED_VIEWER_ORIGINS

    Thread Starter gottfrieds

    (@gottfrieds)

    Thanks for your advice. I will follow the hint.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Access problem’ is closed to new replies.