I found something regarding this, but most examples and explanations are deprecated and it\'s not applicable to RC1.
import {Injectable} from \"@angular/core\";
With RC1 you need to extend the BrowserXhr
class:
@Injectable()
export class CustomBrowserXhr extends BrowserXhr {
constructor() {}
build(): any {
let xhr = super.build();
xhr.withCredentials = true;
return <any>(xhr);
}
}
and override the BrowserXhr
provider with the extended:
bootstrap(AppComponent, [
HTTP_PROVIDERS,
provide(BrowserXhr, { useClass: CustomBrowserXhr })
]);
With the upcoming RC2, you'll be able to use a withCredentials
attribute in request options.
See these links for more details: