diff --git a/server/src/entities/product.entity.ts b/server/src/entities/product.entity.ts index 768a1b1..7ef2ee1 100644 --- a/server/src/entities/product.entity.ts +++ b/server/src/entities/product.entity.ts @@ -14,6 +14,7 @@ export class Product extends CoreEntity { const env = process.env.ENV || 'production'; const prefix = process.env.PREFIX_VERSION || '/api'; const port = process.env.APP_PORT || '4000'; + const domain = process.env.APP_DOMAIN || ''; return (value as string[]).map((item) => { // Nếu đã là URL đầy đủ thì trả về nguyên xi @@ -26,7 +27,7 @@ export class Product extends CoreEntity { if (env === 'dev') { return `http://localhost:${port}${prefix}/${path}`; } - return path; + return `http://${domain}:${port}${prefix}/${path}`; }); }) images: string[];