mirror of
https://github.com/M4X809/list-of-lp.git
synced 2025-12-25 11:12:48 +00:00
Update absolute URL construction in favico API GET route to support environment variable
This commit is contained in:
parent
8d99f739c1
commit
688255f8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ export async function GET(request: NextRequest) {
|
|||
console.log("🚀 ~ route.tsx:29 ~ GET ~ imagePath:", imagePath);
|
||||
// Build absolute URL for the redirect
|
||||
const { nextUrl } = request;
|
||||
const absoluteUrl = `${nextUrl.protocol}//${nextUrl.host}${imagePath}`;
|
||||
const absoluteUrl = urlENV ? `${urlENV}${imagePath}` : `${nextUrl.protocol}//${nextUrl.host}${imagePath}`;
|
||||
console.log("🚀 ~ route.tsx:33 ~ GET ~ absoluteUrl:", absoluteUrl);
|
||||
|
||||
return NextResponse.redirect(absoluteUrl, 307);
|
||||
|
|
|
|||
Loading…
Reference in a new issue