使用 api 文档中(https://openapi.huoban.com/doc-661255)的 open-authorization 会报错跨域 Request header field open-authorization is not allowed by Access-Control-Allow-Headers in preflight response
看了下 OPTIONS 请求,合法的 header 有这些:
access-control-allow-headers: Content-Type, Authorization, X-Huoban-Return-Fields, X-Huoban-H5-Info, X-Huoban-Ticket, X-Huoban-Request-From, X-Huoban-Application-Resource, X-Third-Domain, X-Huoban-Monitor-Debug, X-Huoban-Monitor-Tag, X-Huoban-Monitor-Secret, X-Huoban-Security-Token, X-Huoban-Sensors, X-Huoban-Request-Id, X-Huoban-Client-Id, X-Huoban-Token-Company, X-Huoban-Language
没有在 open api 文档中看到这些 header 的解释,请问如何在 web 前端中直接调用 open api?
access-control-allow-headers:
Content-Type, Authorization, X-Huoban-Return-Fields, X-Huoban-H5-Info, X-Huoban-Ticket, X-Huoban-Request-From, X-Huoban-Application-Resource, X-Third-Domain, X-Huoban-Monitor-Debug, X-Huoban-Monitor-Tag, X-Huoban-Monitor-Secret, X-Huoban-Security-Token, X-Huoban-Sensors, X-Huoban-Request-Id, X-Huoban-Client-Id, X-Huoban-Token-Company, X-Huoban-Language
access-control-allow-headers:
Content-Type, Authorization, X-Huoban-Return-Fields, X-Huoban-H5-Info, X-Huoban-Ticket, X-Huoban-Request-From, X-Huoban-Application-Resource, X-Third-Domain, X-Huoban-Monitor-Debug, X-Huoban-Monitor-Tag, X-Huoban-Monitor-Secret, X-Huoban-Security-Token, X-Huoban-Sensors, X-Huoban-Request-Id, X-Huoban-Client-Id, X-Huoban-Token-Company, X-Huoban-Language
|