允许跨域

pull/382/head
BA7JCM 2021-07-26 01:20:58 +08:00 committed by GitHub
parent fc5cdab36b
commit 46e3527f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,9 @@ include 'vendor/autoload.php';
include 'conststr.php'; include 'conststr.php';
include 'common.php'; include 'common.php';
//允许跨域
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET');
//echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>'; //echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>';
if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') { if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/TencentSCF_file.php'; if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/TencentSCF_file.php';