Skip to content

Commit

Permalink
fix: cors
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Dec 30, 2023
1 parent ac62daf commit 83953b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bereal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
serializer = URLSafeTimedSerializer(SECRET_KEY)

if FLASK_ENV == "development":
logger.info("Enabling CORS for development")
CORS(app)
else:
logger.info("Enabling CORS for production")
CORS(app, resources={r"/*": {"origins": "https://bereal.michaeldemar.co"}})

basedir = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit 83953b4

Please sign in to comment.