diff --git a/coordinator/gscoordinator/coordinator.py b/coordinator/gscoordinator/coordinator.py index bcac18e8a5fe..a3f6f4a7a56f 100644 --- a/coordinator/gscoordinator/coordinator.py +++ b/coordinator/gscoordinator/coordinator.py @@ -29,6 +29,7 @@ import connexion import grpc +from flask_cors import CORS from graphscope.config import Config from graphscope.proto import coordinator_service_pb2_grpc @@ -134,6 +135,8 @@ def start_http_service(config): arguments={"title": "GraphScope FLEX HTTP SERVICE API"}, pythonic_params=True, ) + # support cross origin. + CORS(app.app) app.run(port=config.coordinator.http_port) diff --git a/coordinator/requirements.txt b/coordinator/requirements.txt index 9d6de36eccd4..3a68eb7db874 100644 --- a/coordinator/requirements.txt +++ b/coordinator/requirements.txt @@ -14,6 +14,7 @@ werkzeug == 3.0.3; python_version=="3.5" or python_version=="3.4" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 Flask == 2.2.5 +Flask-Cors == 5.0.0 urllib3 >= 1.25.3, < 2.1.0 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/python/requirements.txt b/python/requirements.txt index 7d7d3206f70e..e374967c375d 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,4 +1,4 @@ -Cython>=3.0.0b3 +Cython>=3.0.0b3,<3.1.0 gremlinpython==3.7.0 grpcio>=1.49 grpcio-tools>=1.49