Check for existence of NEXTAUTH_URL before overwriting (#5419)
* check for existence of NEXTAUTH_URL before overwriting * add commentpull/5403/head
parent
deeb8f38e5
commit
cde02e1a47
|
@ -27,7 +27,8 @@ if (!process.env.CALENDSO_ENCRYPTION_KEY) throw new Error("Please set CALENDSO_E
|
||||||
if (process.env.VERCEL_URL && !process.env.NEXT_PUBLIC_WEBAPP_URL) {
|
if (process.env.VERCEL_URL && !process.env.NEXT_PUBLIC_WEBAPP_URL) {
|
||||||
process.env.NEXT_PUBLIC_WEBAPP_URL = "https://" + process.env.VERCEL_URL;
|
process.env.NEXT_PUBLIC_WEBAPP_URL = "https://" + process.env.VERCEL_URL;
|
||||||
}
|
}
|
||||||
if (process.env.NEXT_PUBLIC_WEBAPP_URL) {
|
// Check for configuration of NEXTAUTH_URL before overriding
|
||||||
|
if (!process.env.NEXTAUTH_URL && process.env.NEXT_PUBLIC_WEBAPP_URL) {
|
||||||
process.env.NEXTAUTH_URL = process.env.NEXT_PUBLIC_WEBAPP_URL + "/api/auth";
|
process.env.NEXTAUTH_URL = process.env.NEXT_PUBLIC_WEBAPP_URL + "/api/auth";
|
||||||
}
|
}
|
||||||
if (!process.env.NEXT_PUBLIC_WEBSITE_URL) {
|
if (!process.env.NEXT_PUBLIC_WEBSITE_URL) {
|
||||||
|
|
Loading…
Reference in New Issue