Skip to content

Commit 033590f

Browse files
authored
refactor(coordinator): Support cross origin (#4322)
As titled.
1 parent 0718caa commit 033590f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

coordinator/gscoordinator/coordinator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import connexion
3131
import grpc
32+
from flask_cors import CORS
3233
from graphscope.config import Config
3334
from graphscope.proto import coordinator_service_pb2_grpc
3435

@@ -134,6 +135,8 @@ def start_http_service(config):
134135
arguments={"title": "GraphScope FLEX HTTP SERVICE API"},
135136
pythonic_params=True,
136137
)
138+
# support cross origin.
139+
CORS(app.app)
137140
app.run(port=config.coordinator.http_port)
138141

139142

coordinator/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ werkzeug == 3.0.3; python_version=="3.5" or python_version=="3.4"
1414
swagger-ui-bundle >= 0.0.2
1515
python_dateutil >= 2.6.0
1616
Flask == 2.2.5
17+
Flask-Cors == 5.0.0
1718
urllib3 >= 1.25.3, < 2.1.0
1819
pydantic >= 2
1920
typing-extensions >= 4.7.1

python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Cython>=3.0.0b3
1+
Cython>=3.0.0b3,<3.1.0
22
gremlinpython==3.7.0
33
grpcio>=1.49
44
grpcio-tools>=1.49

0 commit comments

Comments
 (0)