Skip to content

Commit

Permalink
bugfix: CORS header added to flask
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazzeldorn committed Oct 28, 2023
1 parent 45608cf commit 3d506ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/app.py
Expand Up @@ -2,6 +2,7 @@
import json
from flask import Flask
from flask import jsonify
from flask_cors import CORS # needs pip install Flask-CORS

from user_handling import get_user as user_get_user
from task_handling import set_done as task_set_done
Expand All @@ -11,8 +12,8 @@

from db_controller import get_task_collection, get_user_collection


app = Flask(__name__)
CORS(app)

# call like this: http://127.0.0.1:5000/gettasks/foo
@app.route("/<search>", defaults={'search': None})
Expand Down

0 comments on commit 3d506ac

Please sign in to comment.