Closed CamiAndrei closed 4 years ago
Note that it works for internal absolute URLs, including from subwikis.
When you say "internal absolute URL" you mean an URL that has the same domain as the page where the pdf viewer is used, but it's passed as an absolute URL (starting with https://...
) instead of being passed as relative to the domain (starting with a /...
) , right?
No. I mean the content is external, from a different domain.
This fix is not enough as it is in order to display PDF's from different origins. It only provides a mechanism to define some trusted origin to bypass the pdfjs check that throws origin error. In addition, each XWiki instance owner is responsible to configure the CORS mechanism.
Steps to reproduce:
Note that it works for internal absolute URLs, including from subwikis.
It seems that the pdf.js doesn't allow foreign origin URLs only for hosted viewers : https://github.com/mozilla/pdf.js/issues/7153 and https://github.com/mozilla/pdf.js/pull/6916