fix(xsrf): overwrite already set xsrf header

This commit is contained in:
Barna Tóth
2016-08-19 09:07:48 +02:00
committed by vsavkin
parent 178fb79b5c
commit b4265e0685
2 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ export class CookieXSRFStrategy implements XSRFStrategy {
configureRequest(req: Request) {
let xsrfToken = __platform_browser_private__.getDOM().getCookie(this._cookieName);
if (xsrfToken && !req.headers.has(this._headerName)) {
if (xsrfToken) {
req.headers.set(this._headerName, xsrfToken);
}
}