enzostvs HF Staff commited on
Commit
5d24e52
·
1 Parent(s): ff91290
Files changed (1) hide show
  1. app/api/auth/route.ts +3 -1
app/api/auth/route.ts CHANGED
@@ -5,7 +5,9 @@ export async function GET(req: NextRequest) {
5
  req.headers.get("host") ?? req.headers.get("origin") ?? "localhost:3000";
6
 
7
  console.log("Host:", req.headers.get("host"));
8
- console.log("Origin:", req.headers.get("origin"));
 
 
9
  const redirect_uri =
10
  `${host.includes("localhost") ? "http://" : "https://"}` +
11
  host +
 
5
  req.headers.get("host") ?? req.headers.get("origin") ?? "localhost:3000";
6
 
7
  console.log("Host:", req.headers.get("host"));
8
+ console.log("Origin:", req.headers.get("x-forwarded-host"));
9
+
10
+ // get the domain from the request headers
11
  const redirect_uri =
12
  `${host.includes("localhost") ? "http://" : "https://"}` +
13
  host +