Skip to content

Commit 2a864a0

Browse files
authored
Merge pull request #193 from open-runtimes/PLA-3553
feat: set header `server` value `Executor`
2 parents 57f93cc + 5b625ec commit 2a864a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/http.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Swoole\Runtime;
1212
use Utopia\CLI\Console;
1313
use Utopia\Http\Http;
14+
use Utopia\Http\Response;
1415
use Utopia\Http\Adapter\Swoole\Server;
1516
use Utopia\Orchestration\Adapter\DockerAPI;
1617
use Utopia\Orchestration\Orchestration;
@@ -23,6 +24,11 @@
2324
Runtime::enableCoroutine(true, SWOOLE_HOOK_ALL);
2425

2526
Http::setMode((string)Http::getEnv('OPR_EXECUTOR_ENV', Http::MODE_TYPE_PRODUCTION));
27+
Http::onRequest()
28+
->inject('response')
29+
->action(function (Response $response) {
30+
$response->addHeader('Server', 'Executor');
31+
});
2632

2733
run(function () {
2834
$orchestration = new Orchestration(new DockerAPI(

0 commit comments

Comments
 (0)