Skip to content

Commit a7f00ab

Browse files
committed
hotfix(src/ign-api/run.py): change definition cors headers api
Closes #182
1 parent 1eabb3d commit a7f00ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ign-api/run.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from flask import Flask
33
from flask import jsonify, abort
44
from flask import request, send_file
5-
from flask_cors import CORS, cross_origin
5+
from flask_cors import CORS
66

77
from rq import Queue
88
from rq.job import Job
@@ -16,8 +16,7 @@
1616
API_VERSION_URL = '/' + API_VERSION
1717

1818
app = Flask(__name__)
19-
cors = CORS(app)
20-
app.config['CORS_HEADERS'] = 'Content-Type'
19+
CORS(app, resources={r"/v1/*": {"origins": "*"}})
2120
app.config['UPLOAD_FOLDER'] = '/tmp'
2221
app.config['MAX_CONTENT_LENGTH'] = 128 * 1000 * 1000 # 128MB
2322

0 commit comments

Comments
 (0)