docs(aio): HttpClientXsrfModule withConfig => withOptions (#21185)
Docummentation suggests use of HttpClientXsrfModule#withConfig but this method looks like it's renamed to #withConfig. https://angular.io/guide/http#configuring-custom-cookieheader-names PR Close #21185
This commit is contained in:
parent
bc7a6d7b00
commit
d365077dfa
|
@ -547,12 +547,12 @@ In order to prevent collisions in environments where multiple Angular apps share
|
||||||
|
|
||||||
### Configuring custom cookie/header names
|
### Configuring custom cookie/header names
|
||||||
|
|
||||||
If your backend service uses different names for the XSRF token cookie or header, use `HttpClientXsrfModule.withConfig()` to override the defaults.
|
If your backend service uses different names for the XSRF token cookie or header, use `HttpClientXsrfModule.withOptions()` to override the defaults.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
imports: [
|
imports: [
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
HttpClientXsrfModule.withConfig({
|
HttpClientXsrfModule.withOptions({
|
||||||
cookieName: 'My-Xsrf-Cookie',
|
cookieName: 'My-Xsrf-Cookie',
|
||||||
headerName: 'My-Xsrf-Header',
|
headerName: 'My-Xsrf-Header',
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue