humainflow-web/src/app/app.config.ts

20 lines
809 B
TypeScript

import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
import { provideHttpClient, withInterceptors, withXsrfConfiguration } from '@angular/common/http';
import { provideRouter } from '@angular/router';
import { provideAnimations } from '@angular/platform-browser/animations';
import { authTokenInterceptor, withCredentialsInterceptor } from './interceptors/auth-token.interceptor';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideAnimations(),
provideHttpClient(
withInterceptors([withCredentialsInterceptor, authTokenInterceptor]),
withXsrfConfiguration({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' })
),
provideRouter(routes)
]
};