getRedirectLocationOrThrow() — astro Function Reference
Architecture documentation for the getRedirectLocationOrThrow() function in validate.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 651be17e_0c7c_45ed_74b1_8ace945d5b18["getRedirectLocationOrThrow()"] ecf458e0_e7fa_1089_d6d3_ce60c0cb21bc["validate.ts"] 651be17e_0c7c_45ed_74b1_8ace945d5b18 -->|defined in| ecf458e0_e7fa_1089_d6d3_ce60c0cb21bc style 651be17e_0c7c_45ed_74b1_8ace945d5b18 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/redirects/validate.ts lines 3–13
export function getRedirectLocationOrThrow(headers: Headers): string {
let location = headers.get('location');
if (!location) {
throw new AstroError({
...AstroErrorData.RedirectWithNoLocation,
});
}
return location;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getRedirectLocationOrThrow() do?
getRedirectLocationOrThrow() is a function in the astro codebase, defined in packages/astro/src/core/redirects/validate.ts.
Where is getRedirectLocationOrThrow() defined?
getRedirectLocationOrThrow() is defined in packages/astro/src/core/redirects/validate.ts at line 3.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free