测试平台开发-测试用例综合调度

知识点

axios

跨域通讯

Access to XMLHttpRequest at 'http://127.0.0.1:5000/testcase' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

支持跨域访问
https://flask-cors.readthedocs.io/en/latest/

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 468
Access-Control-Allow-Origin: http://localhost:8080
Vary: Origin
Server: Werkzeug/1.0.1 Python/3.7.6
Date: Sat, 27 Mar 2021 12:26:18 GMT

课后反馈