Skip to content

Commit

Permalink
Merge pull request #21595 from abpframework/ng/core-xsrf-configuration
Browse files Browse the repository at this point in the history
Utilize xsrf-token configuration to AbpCore provider
  • Loading branch information
sumeyyeKurtulus authored Dec 11, 2024
2 parents 7f15f1a + a214542 commit 9b5109d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { makeEnvironmentProviders, APP_INITIALIZER, Injector, Provider } from '@angular/core';
import { TitleStrategy } from '@angular/router';
import {
provideHttpClient,
withInterceptorsFromDi,
withXsrfConfiguration,
} from '@angular/common/http';
import {
CORE_OPTIONS,
LOCALIZATIONS,
Expand Down Expand Up @@ -92,6 +97,13 @@ export function withCompareFuncFactory(

export function provideAbpCore(...features: CoreFeature<CoreFeatureKind>[]) {
const providers = [
provideHttpClient(
withInterceptorsFromDi(),
withXsrfConfiguration({
cookieName: 'XSRF-TOKEN',
headerName: 'RequestVerificationToken',
}),
),
LocaleProvider,
CookieLanguageProvider,
{
Expand Down

0 comments on commit 9b5109d

Please sign in to comment.