From 65f46f502e86e6ebcbebb47404f45e0578c6f75d Mon Sep 17 00:00:00 2001 From: uo277310 Date: Wed, 1 May 2024 15:36:17 +0200 Subject: [PATCH] Arreglo puertos --- gatewayservice/.env | 3 ++- gatewayservice/gateway-service.js | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gatewayservice/.env b/gatewayservice/.env index 1b062ab6..03172f14 100644 --- a/gatewayservice/.env +++ b/gatewayservice/.env @@ -1 +1,2 @@ -PROD_URL=http://51.142.17.139/ \ No newline at end of file +PROD_URL_3000=http://51.142.17.139/:3000 +PROD_URL_8000=http://51.142.17.139/:8000 \ No newline at end of file diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 785265b2..b960d5e8 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -21,11 +21,13 @@ const genQuestServiceUrl = process.env.GEN_SERVICE_URL || 'http://localhost:8003 const rankingServiceUrl = process.env.RANK_SERVICE_URL || 'http://localhost:8004'; const questiongeneratorserviceUrl = process.env.QTEST_SERVICE_URL || 'http://localhost:8007'; -const devUrl = process.env.DEV_URL || 'http://localhost'; -const prodUrl = process.env.PROD_URL; +const devUrl3000 = process.env.DEV_URL_3000 || 'http://localhost:3000'; +const devUrl8000 = process.env.DEV_URL_8000 || 'http://localhost:8000'; +const prodUrl3000 = process.env.PROD_URL_3000; +const prodUrl8000 = process.env.PROD_URL_8000; const corsOptions = { - origin: [devUrl, prodUrl], + origin: [ devUrl3000, devUrl8000, prodUrl3000, prodUrl8000 ], optionsSuccessStatus: 200 }