javascript - CSRF token null in IE 11 while everything is fine in Chrome using Angular 2 and SpringRest -


i new angular2, using xsrfstrategy csrf token.

here typescript code :

export class myxsrfstrategy implements xsrfstrategy  {    _cookiename :string = 'xsrf-token';    _headername :string = 'x-csrf-token';    configurerequest(req) {     const  xsrftoken = ɵgetdom().getcookie(this._cookiename);     console.log("csrf token--->>"+xsrftoken);       if (xsrftoken) {         req.headers.set(this._headername, xsrftoken);     } } } 

here csrf token printing null in logs

spring rest code :

@override     protected void configure(httpsecurity http) throws exception {          cookiecsrftokenrepository cctr=new cookiecsrftokenrepository();         cctr.setcookiehttponly(true);          http.addfilterat(casauthenticationfilter(), basicauthenticationfilter.class)         .cors()             .and().csrf().csrftokenrepository(cctr);      } 

above code working fine in chrome version 56.0.2924.76. but not working in ie11.

here cookie information snapshots same :

snapshot chrome version 56.0.2924.76.

snapshot ie 11 same.

please me find issue , issue in code.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -