diff --git a/fri/server/main.py b/fri/server/main.py index e546761..203a94d 100644 --- a/fri/server/main.py +++ b/fri/server/main.py @@ -5,6 +5,7 @@ from pathlib import Path import json import subprocess +from flask_cors import CORS, cross_origin cur_path = os.path.dirname(os.path.abspath(__file__)) concore_path = os.path.abspath(os.path.join(cur_path, '../../')) @@ -13,6 +14,9 @@ app = Flask(__name__) app.secret_key = "secret key" +cors = CORS(app) +app.config['CORS_HEADERS'] = 'Content-Type' + # To upload multiple file. For example, /upload/test?apikey=xyz @app.route('/upload/', methods=['POST']) def upload(dir):