mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(http): simplify HttpClientModule XSRF configuration (#48957)
The current configuration of `HttpClientModule` explicitely enables the XSRF configuration, but this XSRF configuration is the one used by default by `provideHttpClient`. See https://github.com/angular/angular/blob/main/packages/common/http/src/provider.ts#L50-L98 PR Close #48957
This commit is contained in:
committed by
Andrew Kushnir
parent
9b9c818f99
commit
8fb63dff94
@@ -83,13 +83,7 @@ export class HttpClientXsrfModule {
|
||||
* with supporting services for HTTP communications.
|
||||
*/
|
||||
providers: [
|
||||
provideHttpClient(
|
||||
withInterceptorsFromDi(),
|
||||
withXsrfConfiguration({
|
||||
cookieName: XSRF_DEFAULT_COOKIE_NAME,
|
||||
headerName: XSRF_DEFAULT_HEADER_NAME,
|
||||
}),
|
||||
),
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
})
|
||||
export class HttpClientModule {
|
||||
|
||||
Reference in New Issue
Block a user