CORS error :Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response

后端 未结 6 1404
礼貌的吻别
礼貌的吻别 2020-12-08 13:18

I am trying to send the request from one localhost port to the another. I am using angularjs on the frontend and node on the backend.

Since it is

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 14:03

    For anyone getting this using ServiceStack backend; add "Authorization" to allowed headers in the Cors plugin:

    Plugins.Add(new CorsFeature(allowedHeaders: "Content-Type,Authorization"));

提交回复
热议问题