fetch 中加上 credentials: 'include' 反而会报错 跨域问题。怎么解决
Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
当 Access-Control-Allow-Origin 的值为 '*' 的时候跨域请求不允许携带认证
那么只能在服务端修改 Access-Control-Allow-Origin 的值,改成你指定的允许跨域访问的域的值
比如 Access-Control-Allow-Origin: http://192.168.1.1
这个提示挺明显的吧,如果服务端也是你开发的,你在response里加上Access-Control-Allow-Origin呗
mode 设为 cros