fix: check aliyun fc with official env var
Check aliyun fc with official env var.
see example code in: https://help.aliyun.com/document_detail/89032.html
use of FC_SERVER_PATH with fixed path php7.2 may not compatible with higher php version
This commit is contained in:
@@ -67,8 +67,8 @@ function GetPathSetting($event, $context)
|
||||
$_SERVER['host'] = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
|
||||
$_SERVER['referhost'] = explode('/', $event['headers']['Referer'][0])[2];
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = $event['headers']['If-Modified-Since'][0];
|
||||
$_SERVER['FC_FUNC_CODE_PATH'] = getenv('FC_FUNC_CODE_PATH');
|
||||
$_SERVER['REQUEST_METHOD'] = $event['method'];
|
||||
$_SERVER['FC_SERVER_PATH'] = '/var/fc/runtime/php7.2';
|
||||
return $path;
|
||||
//return spurlencode($path, '/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user