diff --git a/app.py b/app.py index 17f8556..51b219c 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ # Third-party imports from flask import Flask, jsonify, request import json +from flask_cors import CORS, cross_origin # from decouple import config from fantasy_app.functions import get_current_matchups, current_week, get_most_position_points, order_positions_by_points from fantasy_app.contest_list import contests @@ -8,7 +9,7 @@ # app.config['SQLALCHEMY_DATABASE_URI'] = config('DATABASE_URL') app = Flask(__name__) - +CORS(app, supports_credentials=True) # stop tracking modifications # app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False diff --git a/requirements.txt b/requirements.txt index e69d333..b97fdea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ dill==0.3.5.1 docopt==0.6.2 espn-api==0.21.0 Flask==2.2.2 +Flask-Cors==4.0.0 gunicorn==20.1.0 idna==3.3 importlib-metadata==4.12.0