diff --git a/arcor2/VERSION b/arcor2/VERSION index 2b7c5ae0..17b2ccd9 100644 --- a/arcor2/VERSION +++ b/arcor2/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/arcor2/nodes/build.py b/arcor2/nodes/build.py index 8b04897b..b8b76350 100755 --- a/arcor2/nodes/build.py +++ b/arcor2/nodes/build.py @@ -13,6 +13,7 @@ from apispec import APISpec # type: ignore from apispec_webframeworks.flask import FlaskPlugin # type: ignore from flask import Flask, send_file +from flask_cors import CORS # type: ignore from flask_swagger_ui import get_swaggerui_blueprint # type: ignore import arcor2 @@ -42,6 +43,7 @@ ) app = Flask(__name__) +CORS(app) def _publish(project_id: str): diff --git a/arcor2/nodes/execution_proxy.py b/arcor2/nodes/execution_proxy.py index be9ee5bd..8f7fb1ee 100755 --- a/arcor2/nodes/execution_proxy.py +++ b/arcor2/nodes/execution_proxy.py @@ -13,6 +13,7 @@ from apispec import APISpec # type: ignore from apispec_webframeworks.flask import FlaskPlugin # type: ignore from flask import Flask, jsonify, request, send_file +from flask_cors import CORS # type: ignore from flask_swagger_ui import get_swaggerui_blueprint # type: ignore from werkzeug.utils import secure_filename @@ -34,6 +35,7 @@ ) app = Flask(__name__) +CORS(app) # TODO find out why long-lasting connection is not possible (it is getting disconnected after few minutes) diff --git a/setup.py b/setup.py index 33d7e87d..e1accce7 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,8 @@ 'flask_swagger_ui', 'websocket-client', 'pyyaml', # dependency of apispec, for some reason not installed automatically... - 'Pillow' + 'Pillow', + 'flask-cors' ], extras_require={ 'test': [