menu
menuAPI
Configures XSRF protection support for outgoing requests.
Deprecation warning
class HttpClientXsrfModule { static disable(): ModuleWithProviders<HttpClientXsrfModule>; static withOptions(options?: { cookieName?: string | undefined; headerName?: string | undefined; }): ModuleWithProviders<HttpClientXsrfModule>;}
ModuleWithProviders<HttpClientXsrfModule>Disable the default XSRF protection.
ModuleWithProviders<HttpClientXsrfModule>ModuleWithProviders<HttpClientXsrfModule>Configure XSRF protection.
{ cookieName?: string | undefined; headerName?: string | undefined; }An object that can specify either or both cookie name or header name.
XSRF-TOKEN.X-XSRF-TOKEN.ModuleWithProviders<HttpClientXsrfModule>Configures XSRF protection support for outgoing requests.
For a server that supports a cookie-based XSRF protection system, use directly to configure XSRF protection with the correct cookie and header names.
If no names are supplied, the default cookie name is XSRF-TOKEN
and the default header name is X-XSRF-TOKEN.