api请求允许跨域的问题
让api请求允许跨域
header(“Access-Control-Allow-Origin:*”);
header(‘Access-Control-Allow-Credentials:true’);
header(‘Access-Control-Allow-Methods:GET, POST, OPTIONS’);
让api请求允许跨域
header(“Access-Control-Allow-Origin:*”);
header(‘Access-Control-Allow-Credentials:true’);
header(‘Access-Control-Allow-Methods:GET, POST, OPTIONS’);