Skip to content

Commit cbcf67b

Browse files
committed
Update API gateway config key to microservice namespace
Replaces usage of 'services.api_gateway.url' with 'microservice.api_gateway.url' in MicroserviceServiceProvider and related test setup. This change improves configuration clarity and consistency for microservice-specific settings.
1 parent c5e2058 commit cbcf67b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Providers/MicroserviceServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function boot(Router $router): void
9393

9494
return Http::acceptJson()
9595
->withHeaders($correlation ? [$header => $correlation] : [])
96-
->baseUrl(config('services.api_gateway.url'))
96+
->baseUrl(config('microservice.api_gateway.url'))
9797
->timeout(5)
9898
->retry(2, 100);
9999
});
@@ -105,7 +105,7 @@ public function boot(Router $router): void
105105

106106
return Http::acceptJson()
107107
->withHeaders($correlation ? [$header => $correlation] : [])
108-
->baseUrl(config('services.api_gateway.url'))
108+
->baseUrl(config('microservice.api_gateway.url'))
109109
->timeout(5);
110110
});
111111

@@ -117,7 +117,7 @@ public function boot(Router $router): void
117117
return Http::acceptJson()
118118
->withToken($token)
119119
->withHeaders($correlation ? [$header => $correlation] : [])
120-
->baseUrl(config('services.api_gateway.url'))
120+
->baseUrl(config('microservice.api_gateway.url'))
121121
->timeout(5)
122122
->retry(2, 100);
123123
});
@@ -130,7 +130,7 @@ public function boot(Router $router): void
130130
return Http::acceptJson()
131131
->withToken($token)
132132
->withHeaders($correlation ? [$header => $correlation] : [])
133-
->baseUrl(config('services.api_gateway.url'))
133+
->baseUrl(config('microservice.api_gateway.url'))
134134
->timeout(5);
135135
});
136136
}

tests/Http/HttpMacrosTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ protected function getPackageProviders($app)
1515

1616
protected function getEnvironmentSetUp($app)
1717
{
18-
$app['config']->set('services.api_gateway.url', 'http://gateway.test');
18+
$app['config']->set('microservice.api_gateway.url', 'http://gateway.test');
1919
$app['config']->set('microservice.correlation.header', 'X-Correlation-ID');
2020
}
2121

0 commit comments

Comments
 (0)