Skip to content

Commit

Permalink
fix: revert #6814
Browse files Browse the repository at this point in the history
  • Loading branch information
ThangHuuVu committed Apr 1, 2023
1 parent 319f2ce commit a0c819c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/next-auth/src/utils/detect-host.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/** Extract the host from the environment */
export function detectHost(forwardedHost: any) {
// if `NEXTAUTH_URL_INTERNAL` is set, it means NextAuth.js is deployed
// behind a proxy - we prioritize it over `forwardedHost`.
if (process.env.NEXTAUTH_URL_INTERNAL) {
return process.env.NEXTAUTH_URL_INTERNAL
}
// If we detect a Vercel environment, we can trust the host
if (process.env.VERCEL ?? process.env.AUTH_TRUST_HOST)
return forwardedHost
Expand Down

0 comments on commit a0c819c

Please sign in to comment.