Access Control Allow Origin issue in Angular 2

前端 未结 5 826
心在旅途
心在旅途 2020-11-27 22:51

I have a problem with getting data from my node.js server.

The client side is:

    public getTestLines() : Observable {
    let hea         


        
5条回答
  •  攒了一身酷
    2020-11-27 23:32

    Don't set Access-Control-Allow-Origin on the request, it is never needed there. You should double-check if the header is present on the response (check it in the developer console). It would be helpful if you shared more of the backend code.

提交回复
热议问题