From 49b4bbe7e9952d10ccdb4809c21c40d91d3b8be6 Mon Sep 17 00:00:00 2001 From: Devesh Shukla Date: Sat, 17 Aug 2024 18:02:18 +0530 Subject: [PATCH] corsOrigin --- .github/workflows/deploy.yml | 22 +++++++++++----------- backend/src/server.js | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0bd5cd9..c6944c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,14 +32,14 @@ jobs: - name: Verify Pushed Image run: docker pull imdeveshshukla/quiet-backend - # - name: Deploy to EC2 - # uses: appleboy/ssh-action@master working - # with: - # host: ${{ secrets.SSH_HOST }} - # username: ${{ secrets.SSH_USERNAME }} - # key: ${{ secrets.SSH_KEY }} - # script: | - # sudo docker pull imdeveshshukla/quiet-backend:latest - # sudo docker stop web-app || true - # sudo docker rm web-app || true - # sudo docker run --env-file .env --restart-always -d --name web-app -p 3000:3000 imdeveshshukla/quiet-backend:latest \ No newline at end of file + - name: Deploy + uses: appleboy/ssh-action@master #working + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + sudo docker pull imdeveshshukla/quiet-backend:latest + sudo docker stop web-app || true + sudo docker rm web-app || true + sudo docker run --env-file .env --restart always -d --name web-app -p 3000:3000 imdeveshshukla/quiet-backend:latest \ No newline at end of file diff --git a/backend/src/server.js b/backend/src/server.js index e20b951..ad41d38 100644 --- a/backend/src/server.js +++ b/backend/src/server.js @@ -17,7 +17,7 @@ const app = express() const port = 3000 const corsOptions = { credentials: true, - origin: 'https://quiet-9tua.onrender.com', + origin: 'https://www.bequiet.live', methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"], allowedHeaders: [ "Origin",