From 418ea02dd1c904a8f79dbaffc88f2467fdc38725 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Mon, 15 Jul 2024 15:17:37 -0600 Subject: [PATCH] Fallback to use same papi host as terminus host if sandbox. (#58) --- src/SecretsApi/SecretsApi.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SecretsApi/SecretsApi.php b/src/SecretsApi/SecretsApi.php index b7f8f43..6dac6a6 100644 --- a/src/SecretsApi/SecretsApi.php +++ b/src/SecretsApi/SecretsApi.php @@ -32,6 +32,9 @@ private function getBaseURI() if (!$host && strpos($config->get('host'), 'hermes.sandbox-') !== false) { $host = str_replace('hermes', 'pantheonapi', $config->get('host')); } + if (!$host && strpos($config->get('host'), 'sandbox-') !== false) { + $host = $config->get('host'); + } // If host is still not set, use the default host. if (!$host) { $host = 'api.pantheon.io';