diff --git a/apps/frontend/.env.production b/apps/frontend/.env.production index 8dd3fa6..8eefb18 100644 --- a/apps/frontend/.env.production +++ b/apps/frontend/.env.production @@ -1 +1,2 @@ -VITE_API_URL=https://hereconnect.condev.ru/api \ No newline at end of file +VITE_API_URL=https://hereconnect.condev.ru/api +VITE_READ_BASE_URL=https://r.condev.ru \ No newline at end of file diff --git a/apps/frontend/src/api/qrCode.ts b/apps/frontend/src/api/qrCode.ts index de9f77e..85b4611 100644 --- a/apps/frontend/src/api/qrCode.ts +++ b/apps/frontend/src/api/qrCode.ts @@ -13,7 +13,10 @@ export const createQrCodeDocument = async ( >, ) => { const uri = Math.abs(Date.now() - EPOHE).toString(36) - const url = new URL(`/read/${uri}`, location.origin).toString() + const url = new URL( + `${import.meta.env.VITE_READ_BASE_URL || '/read'}/${uri}`, + location.origin, + ).toString() const qrCodeDoc: QRCodeDocument = { _id: `qr_code:${uri}`,