我在不同的服务器上有前端和后端。我需要发出跨域请求。
我使用的是localhost:4200angular2。我localhost:3000使用json-server。\xd0\x95he 服务器应给出标头:
localhost:4200
localhost:3000
Access-Control-Allow-Origin: *\n
但我不知道如何打开它。
javascript cors json-server angular
angular ×1
cors ×1
javascript ×1
json-server ×1