Skip to content

Commit

Permalink
Merge pull request #2 from benschw/master
Browse files Browse the repository at this point in the history
making vault host configurable
  • Loading branch information
violuke authored May 3, 2017
2 parents 1276776 + 1f2cc33 commit 6a4c3b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ class Client

public function __construct(array $options = [], LoggerInterface $logger = null, GuzzleClient $client = null)
{
$base_uri = 'http://127.0.0.1:8200';
if (isset($options['base_uri'])) {
$base_uri = $options['base_uri'];
} else if (getenv('VAULT_ADDR') !== false) {
$base_uri = getenv('VAULT_ADDR');
}

$options = array_replace([
'base_uri' => 'http://127.0.0.1:8200',
'base_uri' => $base_uri,
'http_errors' => false,
'headers' => [
'User-Agent' => 'Vault-PHP-SDK/1.0',
Expand Down

0 comments on commit 6a4c3b6

Please sign in to comment.