HttpClientXsrfModule
From Get docs
< @angular/common | httpAngular/docs/8/api/common/http/httpclientxsrfmodule
HttpClientXsrfModule
ngmodule
Configures XSRF protection support for outgoing requests.
class HttpClientXsrfModule {
static disable(): ModuleWithProviders<HttpClientXsrfModule>
static withOptions(options: { cookieName?: string; headerName?: string; } = {}): ModuleWithProviders<HttpClientXsrfModule>
}
Description
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
.
Static methods
disable() |
---|
Disable the default XSRF protection. |
static disable(): ModuleWithProviders<HttpClientXsrfModule>ParametersThere are no parameters. Returns
|
withOptions() | |||
---|---|---|---|
Configure XSRF protection. | |||
static withOptions(options: { cookieName?: string; headerName?: string; } = {}): ModuleWithProviders<HttpClientXsrfModule>Parameters
Returns
|
Providers
Provider |
---|
|
|
|
|
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v8.angular.io/api/common/http/HttpClientXsrfModule