refactor to use caching interceptor

This commit is contained in:
Jesse Lucas
2020-03-29 16:51:12 -04:00
parent 15c2556e06
commit 9589f25e57
13 changed files with 192 additions and 44 deletions
+5 -1
View File
@@ -1,8 +1,12 @@
/* "Barrel" of Http Interceptors */
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { CSRFInterceptor } from './csrf-intercepor';
import { CSRFInterceptor } from './csrf.interceptor';
import { CachingInterceptor } from './caching.interceptor';
/** Http interceptor providers in outside-in order */
export const httpInterceptorProviders = [
{ provide: HTTP_INTERCEPTORS, useClass: CachingInterceptor, multi: true },
// CSRFInterceptor needs to be last
{ provide: HTTP_INTERCEPTORS, useClass: CSRFInterceptor, multi: true },
];