Accessing PDF on proxy site fails to load view [OJS - 3.3.0.7]

So a client has raised an issue since upgrading to OJS3 that proxies cause the pdf.js viewer to no longer load the view, but they are able to be downloaded.

Looking into how the page differs on the site vs. accessing it on a Proxy I noticed that the $pluginUrl is lost.
Without Proxy:
Screenshot 2021-08-11 150010

With Proxy:
image

I also noticed this in the src attritbute of the iframe that the domain to the specific pdf is lost:

"https://journal.clientdomain.com/plugins/generic/pdfJsViewer/pdf.js/web/viewer.html?file=https://journal.clientdomain.com%2FAFF%2Farticle%2Fdownload%2F16902%2F21285%2F38428"
"/plugins/generic/pdfJsViewer/pdf.js/web/viewer.html?file=%2FAFF%2Farticle%2Fdownload%2F16902%2F21285%2F38428"

To try and workaround this and experiement to see what was happening I tried just loading the correct url into the source directly and get :
Untitled

Any assistance anyone can provide will be greatly appreciated even if it’s just pointing me in the right direction.

As in title OJS version is 3.3.0.7

Hi,

This issue sounds similar to the one I encountered earlier in the year, I resolved it with this fix. Hope this helps, take care.

Rachel

1 Like

Thanks for your reply Rachel,

sadly this fix doesn’t appear to work, I appreciate the suggestion though!

1 Like