顶级域名访问子域名的接口,包跨域,nginx配置了也失败

Access to XMLHttpRequest at 'https://i.antsexpress.net/ants-express-ctrl/membership/getAccountInfo.gou' from origin 'https://antsexpress.net' has been blocked by CORS policy: Request header field jwt is not allowed by Access-Control-Allow-Headers in preflight response.

报了这个错。jwt是我header里需要的获取token的
nginx配置
image.png
哪有问题呢

阅读 249
评论 2019-10-10 提问
    1 个回答

    Request header field jwt is not allowed by Access-Control-Allow-Headers in preflight response

    这个jwt请求头需要在CORS响应里面列出来。

    Access-Control-Allow-Headers: jwt

    评论 赞赏 2019-10-10
      撰写回答

      登录后参与交流、获取后续更新提醒