| 131 | */ |
| 132 | @Injectable() |
| 133 | export class HttpXsrfInterceptor implements HttpInterceptor { |
| 134 | private readonly injector = inject(EnvironmentInjector); |
| 135 | |
| 136 | intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { |
| 137 | return runInInjectionContext(this.injector, () => |
| 138 | xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)), |
| 139 | ); |
| 140 | } |
| 141 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…