Allow setting withCredentials as $http default. #1209

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
8 participants
@thughes
Contributor

thughes commented Jul 30, 2012

Closes #1095.

@mhevery

This comment has been minimized.

Show comment Hide comment
@mhevery

mhevery Sep 5, 2012

Owner

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

Owner

mhevery commented Sep 5, 2012

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@thughes

This comment has been minimized.

Show comment Hide comment
@thughes

thughes Sep 11, 2012

Contributor

Done.

Contributor

thughes commented Sep 11, 2012

Done.

@mhevery

This comment has been minimized.

Show comment Hide comment
@mhevery

mhevery Sep 12, 2012

Owner

merged

Owner

mhevery commented Sep 12, 2012

merged

@abdulazeezsk

This comment has been minimized.

Show comment Hide comment
@abdulazeezsk

abdulazeezsk Jan 23, 2013

Is this commit part of 1.0.3 version? I am using 1.0.3 version but withCredentials is not set by default. I have to set it to true through config object for every $http request. Is there a way i can set it globally? something like $httpProvider?

Is this commit part of 1.0.3 version? I am using 1.0.3 version but withCredentials is not set by default. I have to set it to true through config object for every $http request. Is there a way i can set it globally? something like $httpProvider?

@abdulazeezsk

This comment has been minimized.

Show comment Hide comment
@abdulazeezsk

abdulazeezsk Jan 23, 2013

I tried this way too, still it didn't work,

config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.withCredentials = true;
}]).

I tried this way too, still it didn't work,

config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.withCredentials = true;
}]).

@abdulazeezsk

This comment has been minimized.

Show comment Hide comment
@abdulazeezsk

abdulazeezsk Jan 23, 2013

I have just checked changelog of 1.0.3 and 1.1.1
This fix is part of 1.1.1

I have just checked changelog of 1.0.3 and 1.1.1
This fix is part of 1.1.1

@samaxes

This comment has been minimized.

Show comment Hide comment
@samaxes

samaxes Mar 6, 2013

Contributor

Can this also be merged into the v1.0.x branch?

Contributor

samaxes commented Mar 6, 2013

Can this also be merged into the v1.0.x branch?

@keeth

This comment has been minimized.

Show comment Hide comment
@keeth

keeth Sep 20, 2013

+1

keeth commented Sep 20, 2013

+1

@debovis

This comment has been minimized.

Show comment Hide comment
@debovis

debovis Nov 25, 2013

Using this along with the settings from:

http://enable-cors.org/server_apache.html and http://stackoverflow.com/questions/8074665/cross-origin-resource-sharing-with-credentials

allowed me to get CORS with credentials working, thanks!

debovis commented Nov 25, 2013

Using this along with the settings from:

http://enable-cors.org/server_apache.html and http://stackoverflow.com/questions/8074665/cross-origin-resource-sharing-with-credentials

allowed me to get CORS with credentials working, thanks!

@SebastianBogado

This comment has been minimized.

Show comment Hide comment
@SebastianBogado

SebastianBogado Feb 13, 2014

Is there a way to set allowCredentials for $resource? I can't find any references for it.

Is there a way to set allowCredentials for $resource? I can't find any references for it.

@debovis

This comment has been minimized.

Show comment Hide comment
@debovis

debovis Feb 13, 2014

Here is a good reference:
http://stackoverflow.com/questions/16554270/how-to-configure-angular-resource-ngresource-to-pull-data-from-another-domain

"$resource uses $http under the covers, so set things up with $http and $resource will be ready to go."

I am using this in my .config method:

$httpProvider.defaults.withCredentials = true;

debovis commented Feb 13, 2014

Here is a good reference:
http://stackoverflow.com/questions/16554270/how-to-configure-angular-resource-ngresource-to-pull-data-from-another-domain

"$resource uses $http under the covers, so set things up with $http and $resource will be ready to go."

I am using this in my .config method:

$httpProvider.defaults.withCredentials = true;

@Samurais Samurais referenced this pull request in rockq-org/com.arrking.mobay Nov 7, 2014

Closed

auto signin #5

@NecoleYu

This comment has been minimized.

Show comment Hide comment
@NecoleYu

NecoleYu Feb 10, 2015

+1 it works

+1 it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment