diff --git a/index.php b/index.php index 3e584dc..63974be 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,9 @@ include 'vendor/autoload.php'; include 'conststr.php'; include 'common.php'; +//允许跨域 +header('Access-Control-Allow-Origin: *'); +header('Access-Control-Allow-Methods: GET'); //echo '
'. json_encode($_SERVER, JSON_PRETTY_PRINT).'
'; if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') { if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/TencentSCF_file.php';