fix: use next_public_app_url for share link base url instead of localhost fallback
This commit is contained in:
1 parent
c3e78932fe
commit
14175d3faa
1 file changed
+2
-1
@@ -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