fix: reqToBasePath

This commit is contained in:
Vyacheslav Matyukhin 2022-04-12 12:05:16 +03:00
parent 25fad77f25
commit ba6b11ce6d
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -3,7 +3,7 @@ import { IncomingMessage } from "http";
export const reqToBasePath = (req: IncomingMessage) => {
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
console.log(process.env.NEXT_PUBLIC_VERCEL_URL);
return process.env.NEXT_PUBLIC_VERCEL_URL;
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
}
// we could just hardcode http://localhost:3000 here, but then `next dev -p <CUSTOM_PORT>` would break