try fix filename have [] in FC

pull/408/merge
qkqpttgf 2021-09-28 11:01:44 +08:00 committed by GitHub
parent bb31dee01d
commit d2fd1f3a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ function GetPathSetting($event, $context)
$_SERVER['region'] = $context['region']; $_SERVER['region'] = $context['region'];
$_SERVER['service_name'] = $context['service']['name']; $_SERVER['service_name'] = $context['service']['name'];
$_SERVER['function_name'] = $context['function']['name']; $_SERVER['function_name'] = $context['function']['name'];
$path = $event['path']; $path = str_replace('%5D', ']', str_replace('%5B', '[', $event['path']));
$tmp = $event['requestURI']; $tmp = $event['requestURI'];
if (strpos($tmp, '?')) $tmp = substr($tmp, 0, strpos($tmp, '?')); if (strpos($tmp, '?')) $tmp = substr($tmp, 0, strpos($tmp, '?'));
if ($path=='/'||$path=='') { if ($path=='/'||$path=='') {