MCPcopy Index your code
hub / github.com/angular/angular / hasAuthHeaders

Function hasAuthHeaders

packages/common/http/src/transfer_cache.ts:319–325  ·  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

317
318/** @returns true when the request contains authentication or cookie headers. */
319function hasAuthHeaders(req: HttpRequest<unknown>): boolean {
320 const headers = req.headers;
321
322 return (
323 headers.has('authorization') || headers.has('proxy-authorization') || headers.has('cookie')
324 );
325}
326
327const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']);
328

Callers 1

canUseOrCacheRequestFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…