arkokoley/pdfvuer

offer withCredentials as option for createLoadingTask

econic opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
With createLoadingTask you can't fetch documents that e.g. need a cookie to access.

Describe the solution you'd like
You should be able to pass withCredentials: true to createLoadingTask in order to enable passing credentials along with the fetch request.

Describe alternatives you've considered
This doesn't need an alternative, just pass the option to the pdfjsLib

Additional context
Should be everything, I'm here for questions if needed.

@econic

You can init the createLoadingTask with an object such as

createLoadingTask({
	url: url,
	withCredentials: true
})

This object will be passed along as in to PDF.js