http头

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.

原文地址:https://www.cnblogs.com/tanhao/p/8447269.html