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

Function hasAuthHeaders

packages/common/http/src/transfer_cache.ts:347–353  ·  view source on GitHub ↗

@returns true when the request contains authentication or cookie headers.

(req: HttpRequest<unknown>)

Source from the content-addressed store, hash-verified

345
346/** @returns true when the request contains authentication or cookie headers. */
347function hasAuthHeaders(req: HttpRequest<unknown>): boolean {
348 const headers = req.headers;
349
350 return (
351 headers.has('authorization') || headers.has('proxy-authorization') || headers.has('cookie')
352 );
353}
354
355const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']);
356

Callers 1

canUseOrCacheRequestFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected