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:
cexbrayat
2023-02-05 09:35:51 +01:00
committed by Andrew Kushnir
parent 9b9c818f99
commit 8fb63dff94
+1 -7
View File
@@ -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 {