Skip to content

Commit

Permalink
Arreglo puertos
Browse files Browse the repository at this point in the history
  • Loading branch information
uo277310 committed May 1, 2024
1 parent b81f45b commit 65f46f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gatewayservice/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PROD_URL=http://51.142.17.139/
PROD_URL_3000=http://51.142.17.139/:3000
PROD_URL_8000=http://51.142.17.139/:8000
8 changes: 5 additions & 3 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 65f46f5

Please sign in to comment.