You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use rasterizeHTML to rasterize html that includes an image with src that points to a server which requires Authorization through a Bearer Token.
It doesn't seem there is currently any way to attach a Header to the requests made from rasterizeHTML through inlineresources. It would be very helpful to enable this functionality, then expose it through rasterizeHTML.
The text was updated successfully, but these errors were encountered:
A workaround for now could be to replace the global instance of XMLHttpRequest with an implementation that provides this header. An example implementation of a proxy instance can be found in src/proxies.js of rasterizeHTML.js.
I still feel this is a bit of a stretch for the library, but understand that users might have different needs when fetching resources. A solution could be to provide a way to inject an alternative dependency for making calls. Ideas welcome.
I'm trying to use rasterizeHTML to rasterize html that includes an image with src that points to a server which requires Authorization through a Bearer Token.
It doesn't seem there is currently any way to attach a Header to the requests made from rasterizeHTML through inlineresources. It would be very helpful to enable this functionality, then expose it through rasterizeHTML.
The text was updated successfully, but these errors were encountered: