2020-03-21 00:44:21 +01:00
|
|
|
/* "Barrel" of Http Interceptors */
|
|
|
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
2020-03-25 00:19:54 +01:00
|
|
|
|
|
|
|
import { CSRFInterceptor } from './csrf.interceptor';
|
|
|
|
import { CachingInterceptor } from './caching.interceptor';
|
2020-04-06 20:32:27 +02:00
|
|
|
import { ErrorInterceptor } from './error.interceptor';
|
2020-03-21 00:44:21 +01:00
|
|
|
|
|
|
|
/** Http interceptor providers in outside-in order */
|
|
|
|
export const httpInterceptorProviders = [
|
2020-03-25 00:19:54 +01:00
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: CachingInterceptor, multi: true },
|
2020-04-06 20:32:27 +02:00
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
2020-03-25 00:19:54 +01:00
|
|
|
// CSRFInterceptor needs to be last
|
2020-03-21 00:44:21 +01:00
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: CSRFInterceptor, multi: true },
|
|
|
|
];
|