Closed Zaid-Ajaj closed 6 years ago
XMLHttpRequest
will send httpOnly
cookies by default as long as it is the same origin. For other domains, you must set withCredentials
= true
.
See here for more info.
@Elonon I have read that but I wasn't sure if it is needed since I am explicitly adding document.cookie
to the request headers by hand, I also looked into the handling of credentials in github/fetch and it seems to switch withCredentials
to true
only when request.credentials
is "include"
which I was not using in previous release
httpOnly
cookies still aren't available in document.cookie
, but you are correct that to match your previous set up, you don't need to set withCredentials
to true
. I mentioned it because maybe you want to provide an option if a user needs it. You should not set it to true
by default at any rate. It might be a good idea to add an integration test that ensures that httpOnly
cookies are round-tripped. I may be able to look into that next week if you like.
@Elonon That would be awesome! Thanks a lot :smile: send a PR anytime you like and I will review
Fixes #80 and simplifies the overall proxy implementation
Breaking changes:
CustomHeaders
in typeRemoteBuilderOptions
are now of type(string * string) list
Response
inProxyRequestException
is simplified to:instead of using the full
Response
type from PowerPackNotes
@Elonon I am not sure what the equivalent is to
Crendentials: Same-origin
when I am usingXMLHttpRequest
, any ideas?