Skip to content

Commit

Permalink
refactor(coordinator): Support cross origin (#4322)
Browse files Browse the repository at this point in the history
As titled.
  • Loading branch information
zhanglei1949 authored Nov 15, 2024
1 parent 0718caa commit 033590f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions coordinator/gscoordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)


Expand Down
1 change: 1 addition & 0 deletions coordinator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 033590f

Please sign in to comment.