Any way to prevent WebViewer from doing HEAD request?

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version

‘8.1.0’

Detailed description of issue

When loading document, the viewer tries to HEAD . This is problematic as URLs I give to it are pre-signed S3 URLs and they are not authorizing for HEAD, just GET. Ultimately, WebViewer still works, but creates an exception in console, which might also lead to a minor slowdown.

Expected behaviour
Have an option to disable HEAD

Does your issue happen with every document, or just one?

Every document

1 Like

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:

Guides:APIs:Forums:

Hey there!

Right now we do not have an API to disable this. A HEAD request is made to attempt to get the file type and size before loading it.

However we should be able to add an API to disable this. I’ll add it to our backlog and see what we can do.

Thanks for the feedback,
Logan

2 Likes

I too have this issue and I’m unable to upgrade until there is a workaround. version 8.7.0