Skip to content

Commit

Permalink
feat: enables auth on custom domain by preventing redirects based on …
Browse files Browse the repository at this point in the history
…DISABLE_VERCEL_REDIRECT
  • Loading branch information
mohitb35 committed Jan 17, 2024
1 parent 8ccd0d1 commit a2d8163
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ const scheme =
: "https";

let APPUrl;
if (process.env.NEXT_PUBLIC_VERCEL_ENV === "preview") {
if (
process.env.NEXT_PUBLIC_VERCEL_ENV === "preview" &&
process.env.DISABLE_VERCEL_REDIRECT !== "true"
) {
APPUrl = `${scheme}://${process.env.VERCEL_URL}`;
} else {
APPUrl = process.env.APP_URL;
Expand Down

0 comments on commit a2d8163

Please sign in to comment.