File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 2929
3030import connexion
3131import grpc
32+ from flask_cors import CORS
3233from graphscope .config import Config
3334from 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
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ werkzeug == 3.0.3; python_version=="3.5" or python_version=="3.4"
1414swagger-ui-bundle >= 0.0.2
1515python_dateutil >= 2.6.0
1616Flask == 2.2.5
17+ Flask-Cors == 5.0.0
1718urllib3 >= 1.25.3 , < 2.1.0
1819pydantic >= 2
1920typing-extensions >= 4.7.1
Original file line number Diff line number Diff line change 1- Cython >= 3.0.0b3
1+ Cython >= 3.0.0b3 , < 3.1.0
22gremlinpython == 3.7.0
33grpcio >= 1.49
44grpcio-tools >= 1.49
You can’t perform that action at this time.
0 commit comments