File tree Expand file tree Collapse file tree
nodejs-autospace/api-gateway/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,19 +65,23 @@ jobs:
6565 git reset --hard origin/stage
6666
6767 cd nodejs-autospace/api-gateway
68- pnpm install --prod --ignore-scripts
68+ pnpm install
69+ pnpm build
6970 pm2 restart api-gateway || pm2 start dist/index.js --name api-gateway
7071
7172 cd ~/auth-service/autospace/nodejs-autospace/auth-service
72- pnpm install --prod --ignore-scripts
73+ pnpm install
74+ pnpm build
7375 pm2 restart auth-service || pm2 start dist/server.js --name auth-service
7476
7577 cd ~/resource-service/autospace/nodejs-autospace/resource-service
76- pnpm install --prod --ignore-scripts
78+ pnpm install
79+ pnpm build
7780 pm2 restart resource-service || pm2 start dist/server.js --name resource-service
7881
7982 cd ~/booking-service/nodejs-autospace/booking-service
80- pnpm install --prod --ignore-scripts
83+ pnpm install
84+ pnpm build
8185 pm2 restart booking-service || pm2 start dist/server.js --name booking-service
8286
8387 echo " Clean frontend..."
Original file line number Diff line number Diff line change @@ -27,25 +27,21 @@ app.use(helmet());
2727
2828// in local commend that here change on lacal
2929
30- const allowedOrigins = [
31- "https://autospace.space" ,
32- "https://www.autospace.space" ,
33- ] ;
34-
35- app . set ( "trust proxy" , 1 ) ;
36-
3730app . use (
3831 cors ( {
3932 origin : ( origin , callback ) => {
4033 if ( ! origin ) return callback ( null , true ) ;
4134
42- if ( allowedOrigins . includes ( origin ) ) {
35+ if (
36+ origin === "https://autospace.space" ||
37+ origin === "https://www.autospace.space"
38+ ) {
4339 return callback ( null , true ) ;
4440 }
4541
46- console . log ( " Blocked by CORS:" , origin ) ;
42+ console . log ( "Blocked by CORS:" , origin ) ;
4743
48- return callback ( null , false ) ;
44+ return callback ( null , false ) ; // THIS LINE ONLY
4945 } ,
5046 credentials : true ,
5147 } ) ,
You can’t perform that action at this time.
0 commit comments