标签:cep requested max delete header AC get method control
ob_start();//清空缓冲区
header(‘Access-Control-Allow-Origin:*‘);
header(‘Access-Control-Allow-Methods:POST, GET, OPTIONS, PUT, DELETE‘);
header(‘Access-Control-Max-Age:1728000‘);
if($_SERVER[‘HTTP_ACCEPT‘] == "OPTIONS"){
header(‘Access-Control-Allow-Headers:Content-Type, Accept, Authorization, X-Requested-With, X_Requested_With, Origin‘);
header(‘Access-Control-Request-Method:*‘);
}
标签:cep requested max delete header AC get method control
原文地址:https://www.cnblogs.com/liuxiaol/p/9015735.html