ng2-pdfjs-viewer icon indicating copy to clipboard operation
ng2-pdfjs-viewer copied to clipboard

How to add aditional HTTP headers to ng2-pdfjs-viewer

Open vrevanna opened this issue 5 years ago • 2 comments

In my case [pdfSrc] is backend api which returns pdf data. To authenticate api I need to pass Authorization header. How to pass aditional header to pass this through. Checked ng2-pdfjs-viewer documentation but i don't see anything.

vrevanna avatar Oct 05 '20 10:10 vrevanna

@vrevanna As of now, pdf is loaded in an iframe with an http get request. Let me look into this if custom headers can be added

codehippie1 avatar Feb 28 '21 04:02 codehippie1

@vrevanna Check these out https://stackoverflow.com/questions/13432821/is-it-possible-to-add-request-headers-to-an-iframe-src-request https://stackoverflow.com/questions/17694807/how-to-set-custom-http-headers-when-changing-iframe-src/17695034#17695034

codehippie1 avatar Feb 28 '21 04:02 codehippie1