use BasicAuth in encrypted folder. fix: error_log in SCF

This commit is contained in:
root
2021-01-16 17:12:03 +08:00
parent 5e49a44ec1
commit 34599a6e71
13 changed files with 133 additions and 93 deletions
+5
View File
@@ -27,6 +27,11 @@ function GetGlobalVariable($event)
$_COOKIE[urldecode(substr($cookievalues,0,$pos))]=urldecode(substr($cookievalues,$pos+1));
}
$_SERVER['HTTP_USER_AGENT'] = $event['headers']['User-Agent'];
if (isset($event['headers']['authorization'])) {
$basicAuth = splitfirst(base64_decode(splitfirst($event['headers']['authorization'], 'Basic ')[1]), ':');
$_SERVER['PHP_AUTH_USER'] = $basicAuth[0];
$_SERVER['PHP_AUTH_PW'] = $basicAuth[1];
}
$_SERVER['HTTP_TRANSLATE'] = $event['headers']['translate'];//'f'
$_SERVER['BCE_CFC_RUNTIME_NAME'] = 'php7';
}