(url: RequestInfo)
| 390 | } |
| 391 | |
| 392 | function getUrlForFetchCacheKey(url: RequestInfo) { |
| 393 | const urlString = url instanceof Request ? url.url : String(url); |
| 394 | try { |
| 395 | const parsedUrl = new URL(urlString); |
| 396 | if (!hasSensitiveSearchParam(parsedUrl.searchParams)) { |
| 397 | return urlString; |
| 398 | } |
| 399 | parsedUrl.search = ''; |
| 400 | return { |
| 401 | href: parsedUrl.toString(), |
| 402 | searchParams: getSearchParamsForFetchCacheKey(new URL(urlString).searchParams), |
| 403 | }; |
| 404 | } catch { |
| 405 | return getStringForFetchCacheKey(urlString); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | function getHeadersForCacheKey(url: RequestInfo, options: RequestInit) { |
| 410 | const headers = new Headers(getFetchWithProxyHeaders(url, options)); |
no test coverage detected
searching dependent graphs…