fix: too many redirect in SCF/FC/FG/CFC
parent
724f357fc4
commit
9d677c8aee
|
@ -54,9 +54,6 @@ function GetPathSetting($event, $context)
|
||||||
//$_SERVER['base_path'] = substr($tmp, 0, strlen(urldecode($event['path'])));
|
//$_SERVER['base_path'] = substr($tmp, 0, strlen(urldecode($event['path'])));
|
||||||
}
|
}
|
||||||
$_SERVER['base_path'] = spurlencode($_SERVER['base_path'], '/');
|
$_SERVER['base_path'] = spurlencode($_SERVER['base_path'], '/');
|
||||||
|
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['clientIP'];
|
$_SERVER['REMOTE_ADDR'] = $event['clientIP'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['X-Requested-With'][0];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['X-Requested-With'][0];
|
||||||
|
|
|
@ -34,8 +34,6 @@ function GetPathSetting($event, $context)
|
||||||
$_SERVER['functionBrn'] = $context['functionBrn'];
|
$_SERVER['functionBrn'] = $context['functionBrn'];
|
||||||
$_SERVER['base_path'] = '/';
|
$_SERVER['base_path'] = '/';
|
||||||
$path = $event['path'];
|
$path = $event['path'];
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['X-Requested-With'];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['X-Requested-With'];
|
||||||
|
|
|
@ -57,8 +57,6 @@ function GetPathSetting($event, $context)
|
||||||
$_SERVER['base_path'] = substr($_SERVER['base_path'], 0, -strlen($path));
|
$_SERVER['base_path'] = substr($_SERVER['base_path'], 0, -strlen($path));
|
||||||
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
|
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
|
||||||
}
|
}
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['headers']['x-real-ip'];
|
$_SERVER['REMOTE_ADDR'] = $event['headers']['x-real-ip'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
||||||
|
|
|
@ -57,8 +57,6 @@ function GetPathSetting($event, $context)
|
||||||
$_SERVER['base_path'] = substr($_SERVER['base_path'], 0, -strlen($path));
|
$_SERVER['base_path'] = substr($_SERVER['base_path'], 0, -strlen($path));
|
||||||
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
|
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
|
||||||
}
|
}
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['headers']['x-real-ip'];
|
$_SERVER['REMOTE_ADDR'] = $event['headers']['x-real-ip'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
||||||
|
|
|
@ -41,8 +41,6 @@ function GetPathSetting($event, $context)
|
||||||
$_SERVER['base_path'] = $event['requestContext']['path'];
|
$_SERVER['base_path'] = $event['requestContext']['path'];
|
||||||
$path = substr($event['path'], strlen($event['requestContext']['path']));
|
$path = substr($event['path'], strlen($event['requestContext']['path']));
|
||||||
}
|
}
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
||||||
|
|
|
@ -41,8 +41,6 @@ function GetPathSetting($event, $context)
|
||||||
$_SERVER['base_path'] = $event['requestContext']['path'];
|
$_SERVER['base_path'] = $event['requestContext']['path'];
|
||||||
$path = substr($event['path'], strlen($event['requestContext']['path']));
|
$path = substr($event['path'], strlen($event['requestContext']['path']));
|
||||||
}
|
}
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
|
||||||
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
//$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||||
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
$_SERVER['REMOTE_ADDR'] = $event['requestContext']['sourceIp'];
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['x-requested-with'];
|
||||||
|
|
Loading…
Reference in New Issue