MCPcopy Create free account
hub / github.com/angular/angular / HttpXsrfInterceptor

Class HttpXsrfInterceptor

packages/common/http/src/xsrf.ts:138–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 */
137@Injectable()
138export class HttpXsrfInterceptor implements HttpInterceptor {
139 private readonly injector = inject(EnvironmentInjector);
140
141 intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
142 return runInInjectionContext(this.injector, () =>
143 xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)),
144 );
145 }
146}

Callers

nothing calls this directly

Calls 1

injectFunction · 0.90

Tested by

no test coverage detected