摘要:
1、前端header头部加入字段 header: { 'content-type': 'application/x-www-form-urlencoded', 'token': token, //token加密 'version': 'v1', //接口版本 }, 2、服务端加入字段 token,v 阅读全文
摘要:
1、服务器判断预请求还是真实请求 if (strtoupper($_SERVER['REQUEST_METHOD']) == 'OPTIONS') { exit; } 2、指定本次预检请求的有效期,单位为秒。Access-Control-Max-Age: 1728000 ,有效期是20天(17280 阅读全文