Skip to content

Commit

Permalink
Added Flask-CORS which defaults to allowing all origins
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmwatson committed Sep 30, 2024
1 parent ca5a45c commit cb37c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pmg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os

from flask import Flask
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_caching import Cache
Expand All @@ -26,6 +27,7 @@
integrations=[FlaskIntegration()])

app = Flask(__name__, static_folder="static")
CORS(app)
app.config.from_pyfile("../config/config.py")

# setup logging
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Flask==2.0.0
Flask-Admin==1.6.1
Flask-Assets==0.10
Flask-Caching==2.0.2
Flask-Cors==5.0.0
Flask-Login==0.3.0
Flask-Mail==0.9.1
flask-marshmallow==0.7.0
Expand Down

0 comments on commit cb37c04

Please sign in to comment.