Update scf.php

pull/18/head
居桉 2020-02-27 18:32:34 +08:00 committed by GitHub
parent f10a1e8f24
commit 61f645627a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -33,7 +33,6 @@ function GetPathSetting($event, $context)
$host_name = $event['headers']['host']; $host_name = $event['headers']['host'];
$_SERVER['HTTP_HOST'] = $host_name; $_SERVER['HTTP_HOST'] = $host_name;
$serviceId = $event['requestContext']['serviceId']; $serviceId = $event['requestContext']['serviceId'];
$Region = $event['requestContext']['Region'];
if ( $serviceId === substr($host_name,0,strlen($serviceId)) ) { if ( $serviceId === substr($host_name,0,strlen($serviceId)) ) {
$_SERVER['base_path'] = '/'.$event['requestContext']['stage'].'/'.$_SERVER['function_name'].'/'; $_SERVER['base_path'] = '/'.$event['requestContext']['stage'].'/'.$_SERVER['function_name'].'/';
$path = substr($event['path'], strlen('/'.$_SERVER['function_name'].'/')); $path = substr($event['path'], strlen('/'.$_SERVER['function_name'].'/'));