[Pkg-javascript-commits] [node-stream-http] 67/208: Use same-origin instead of omit with fetch credentials
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 5fc4858d6dc3a0a5fefcb0bcbede94abd390ffb7
Author: Cesar Andreu <cesarandreu at gmail.com>
Date: Sun Jul 19 17:06:28 2015 -0700
Use same-origin instead of omit with fetch credentials
In order to have parity with XMLHttpRequest fetch credentials should use same-origin instead of omit
Setting XMLHttpRequest.withCredentials to false has no effect on same-site request
---
lib/request.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/request.js b/lib/request.js
index 755d0ee..42d0110 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -119,7 +119,7 @@ ClientRequest.prototype._onFinish = function () {
headers: headers,
body: body,
mode: 'cors',
- credentials: opts.withCredentials ? 'include' : 'omit'
+ credentials: opts.withCredentials ? 'include' : 'same-origin'
}).then(function (response) {
self._fetchResponse = response
self._connect()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list