// laravel public/index.php
// tp public/index.php
if (!empty($_SERVER['HTTP_ORIGIN'])) {
$allowed_origins = ["http://baidu.com"];
if (in_array($_SERVER['HTTP_ORIGIN'], $allowed_origins)) {
header("Access-Control-Allow-Origin: " . $_SERVER['HTTP_ORIGIN']);
header("Access-Control-Allow-Headers: 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,token'");
}
}