-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.9.528 doesn't include credentials on chrome #8888
Comments
We are switching to more efficient fetch() instead of XHR. The defaults might change, let us know which default in https://developer.mozilla.org/en-US/docs/Web/API/Request/Request affects CSRF-TOKEN. If it's possible we will try to address this. Also notice that we don't want to make PDF.js less secure (even if we supported this in the past) |
I'm not sure about that. Maybe
|
We are including pdf.js/src/display/fetch_stream.js Line 29 in 9b14f8e
I think that is why it works when you set |
I think so. |
Okay, from reading https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials, I have impression that to be compatible with XHR we need to use 'same-origin' instead of 'omit' there. I think it is safe in our context. |
I think |
That's how XHR worked before we introduced fetch(). |
Fix #8888: Change behaviour of fetch to make it compatible with XHR.
Fix mozilla#8888: Change behaviour of fetch to make it compatible with XHR.
We had this code to get pdf through authenticated url
PDFJS.getDocument(url)
that breaks with version 1.9.528 on Chrome because it doesn't include CSRF-TOKEN in the request. However, it works on firefox and safari. Now I have to fix it by enforce withCredentials: true. Does new version set the default of withCredentials to false?
The text was updated successfully, but these errors were encountered: