Ajax Request header field Key is not allowed by Access-Control-Allow-Headers

后端 未结 3 1497
广开言路
广开言路 2021-02-04 06:21

Trying to build a DNN Service Framework WebAPI but I\'m having trouble consuming it with CORS. I have all of the appropriate headers (I think) but it still doesn\'t seem to be w

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 07:20

    Add this to your server response headers :

    header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token , Authorization');

提交回复
热议问题