在hapi server上一直报“Request header field authorization is not allowed”

问题描述 投票:0回答:0

我已经尝试了我在互联网上找到的 hapi cors 设置的所有组合,但我不断得到:

... has been blocked by CORS policy: Request header field authorization
is not allowed by Access-Control-Allow-Headers in preflight response.

服务器似乎检测到带有 204 的 OPTIONS 请求,并且在没有 Authorization 标头的情况下工作正常。

请帮助我,我正在使用 Hapi v21.2.2

node.js cors authorization hapi.js hapi
© www.soinside.com 2019 - 2024. All rights reserved.