If your backend service uses different names for the XSRF token cookie or header, use HttpClientXsrfModule.withOptions () to override the defaults. imports : [ HttpClientModule , HttpClientXsrfModule . withOptions ({ cookieName: 'My-Xsrf-Cookie' , headerName: 'My-Xsrf-Header' , }), ], withOptions() - Configure XSRF protection. An object that can specify either or both cookie name or header name. 1. Cookie name default is XSRF-TOKEN . 2. Header name default is X-XSRF-TOKEN . static withOptions ( options : { cookieName? : string ; headerName ?: string ; } = {}): ModuleWithProviders < HttpClientXsrfModule > HttpClientXsrfModule - Configures XSRF protection support for outgoing requests. class HttpClientXsrfModu...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers