From 95275d8e3ada251e02eea7c58875245aca6022ff Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 29 Jul 2012 17:52:19 -0700 Subject: [PATCH] fix($http): Allow setting withCredentials as default. Closes #1095. --- src/ng/http.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ng/http.js b/src/ng/http.js index deeb6cbb2621..32975bb110b6 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -486,6 +486,10 @@ function $HttpProvider() { delete reqHeaders['Content-Type']; } + if (isUndefined(config.withCredentials) && !isUndefined($config.withCredentials)) { + config.withCredentials = $config.withCredentials; + } + // send request promise = sendReq(config, reqData, reqHeaders);