From 3fbb83e3795f46ee3f19ebb888c04a80440f1c32 Mon Sep 17 00:00:00 2001 From: upayanmazumder Date: Wed, 20 Nov 2024 11:59:50 +0530 Subject: [PATCH] Update CORS configuration to allow localhost and add Docker Compose setup --- api/main.py | 2 +- docker-compose.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/api/main.py b/api/main.py index 9ffe34b..bc883ac 100644 --- a/api/main.py +++ b/api/main.py @@ -2,7 +2,7 @@ from flask_cors import CORS app = Flask(__name__) -CORS(app, origins=["https://api.collaborative-article-sharing.upayan.dev/"]) +CORS(app, origins=["https://api.collaborative-article-sharing.upayan.dev/", "http://localhost:3000/"]) @app.route('/') def home(): diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..af567df --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +services: + collaborative-article-sharing: + image: ghcr.io/upayanmazumder/collaborative-article-sharing:latest + ports: + - "3000:3000"