Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -15,6 +15,8 @@ class InstanceProfileProvider
const SERVER_URI = 'http://169.254.169.254/latest/';
const CRED_PATH = 'meta-data/iam/security-credentials/';
const ENV_DISABLE = 'AWS_EC2_METADATA_DISABLED';
/** @var string */
private $profile;
@@ -67,6 +69,13 @@ class InstanceProfileProvider
*/
private function request($url)
{
$disabled = getenv(self::ENV_DISABLE) ?: false;
if (strcasecmp($disabled, 'true') === 0) {
throw new CredentialsException(
$this->createErrorMessage('EC2 metadata server access disabled')
);
}
$fn = $this->client;
$request = new Request('GET', self::SERVER_URI . $url);
@@ -77,7 +86,7 @@ class InstanceProfileProvider
$reason = $reason['exception'];
$msg = $reason->getMessage();
throw new CredentialsException(
$this->createErrorMessage($msg, 0, $reason)
$this->createErrorMessage($msg)
);
});
}