header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Headers:content-type");
header("Access-Control-Request-Method:GET,POST");
if(strtoupper($_SERVER['REQUEST_METHOD'])== 'OPTIONS'){ // 遇到options直接返回
exit;
}
header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Headers:content-type");
header("Access-Control-Request-Method:GET,POST");
if(strtoupper($_SERVER['REQUEST_METHOD'])== 'OPTIONS'){ // 遇到options直接返回
exit;
}
本文标题:axios跨域请求,重复提交问题
本文链接:https://www.haomeiwen.com/subject/wlgxwktx.html
网友评论