(headers: HttpHeaders)
| 353 | const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']); |
| 354 | |
| 355 | function hasUncacheableCacheControl(headers: HttpHeaders): boolean { |
| 356 | const cacheControl = headers.get('cache-control'); |
| 357 | |
| 358 | if (!cacheControl) { |
| 359 | return false; |
| 360 | } |
| 361 | |
| 362 | return cacheControl.split(',').some((directive) => { |
| 363 | const directiveName = directive.split('=', 1)[0].trim().toLowerCase(); |
| 364 | |
| 365 | return UNCACHEABLE_CACHE_CONTROL_DIRECTIVES.has(directiveName); |
| 366 | }); |
| 367 | } |
| 368 | |
| 369 | function hasSetCookieHeader(headers: HttpHeaders): boolean { |
| 370 | return headers.has('set-cookie'); |
no test coverage detected