From c7abe76235bbd29470ea685287b3c6abd8cf93e6 Mon Sep 17 00:00:00 2001 From: Vianney Veremme <10519369+Vianpyro@users.noreply.github.com> Date: Sun, 17 Nov 2024 11:14:11 -0500 Subject: [PATCH] Add CORS support to Flask application and update requirements (#7) --- app.py | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/app.py b/app.py index a03a901..64fd38e 100644 --- a/app.py +++ b/app.py @@ -8,12 +8,14 @@ import datetime from flask import Flask, jsonify, redirect +from flask_cors import CORS from config import Config from routes import register_routes app = Flask(__name__) app.config.from_object(Config) +CORS(app) @app.route("/", methods=["GET"]) diff --git a/requirements.txt b/requirements.txt index 2556013..a472695 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ flask>=3.0.3 +flask-cors>=5.0.0 pymysql>=1.1.1 pytest>=8.3.3 python-dotenv>=1.0.1