astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
14 lines (13 loc) • 321 B
JavaScript
import { AstroError, AstroErrorData } from "../errors/index.js";
function getRedirectLocationOrThrow(headers) {
let location = headers.get("location");
if (!location) {
throw new AstroError({
...AstroErrorData.RedirectWithNoLocation
});
}
return location;
}
export {
getRedirectLocationOrThrow
};