fix: use next_public_app_url for share link base url instead of localhost fallback
This commit is contained in:
@@ -20,7 +20,8 @@ function hashToken(raw: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildUrl(token: string): string {
|
function buildUrl(token: string): string {
|
||||||
const base = process.env["NEXTAUTH_URL"] ?? "http://localhost:3000";
|
const base =
|
||||||
|
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
|
||||||
return `${base}/s/${token}`;
|
return `${base}/s/${token}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user