Access-Control-Allow-Origin 响应头指定了该响应的资源是否被允许与给定的origin共享。

Access-Control-Allow-Credentials 响应头表示是否可以将对请求的响应暴露给页面。返回true则可以,其他值均不可以。

响应首部 Access-Control-Allow-Methods 在对 preflight request.(预检请求)的应答中明确了客户端所要访问的资源允许使用的方法或方法列表。

响应首部 Access-Control-Allow-Headers 用于 preflight request (预检请求)中,列出了将会在正式请求的 Access-Control-Expose-Headers 字段中出现的首部信息。

简单首部,如 simple headersAcceptAccept-LanguageContent-LanguageContent-Type (只限于解析后的值为 application/x-www-form-urlencoded、multipart/form-data 或 text/plain 三种MIME类型(不包括参数)),它们始终是被支持的,不需要在这个首部特意列出。

如果请求中含有 Access-Control-Request-Headers 字段,那么这个首部是必要的。

The Access-Control-Expose-Headers response header indicates which headers can be exposed as part of the response by listing their names.

相关文章:

  • 2021-05-19
  • 2021-12-11
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2022-02-14
  • 2022-12-23
  • 2021-09-25
  • 2021-11-11
  • 2022-12-23
  • 2021-03-27
  • 2021-05-11
相关资源
相似解决方案