MCPcopy
hub / github.com/vercel/next.js / hasRedirectHeaders

Function hasRedirectHeaders

packages/next-routing/src/destination.ts:85–88  ·  view source on GitHub ↗
(headers: Record<string, string>)

Source from the content-addressed store, hash-verified

83 * Checks if headers contain redirect headers (Location or Refresh)
84 */
85export function hasRedirectHeaders(headers: Record<string, string>): boolean {
86 const lowerCaseKeys = Object.keys(headers).map((k) => k.toLowerCase())
87 return lowerCaseKeys.includes('location') || lowerCaseKeys.includes('refresh')
88}

Callers 2

processRoutesFunction · 0.90
resolveRoutesFunction · 0.90

Calls 4

toLowerCaseMethod · 0.80
includesMethod · 0.80
keysMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected