From bfcad2caecc96bcad565ca3906796b70c7be6327 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 4 Feb 2024 13:58:56 +0200 Subject: [PATCH] add response settings --- example/config.json | 8 ++++++++ src/server.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/example/config.json b/example/config.json index 6bb15c3..e387dba 100644 --- a/example/config.json +++ b/example/config.json @@ -16,6 +16,14 @@ { "host":"127.0.0.1", "port":1965 + }, + "response": + { + "default": + { + "code":20, + "meta":"text/gemini; charset=utf-8;" + } } }, "memcached": diff --git a/src/server.php b/src/server.php index 420f4f1..ebba2c1 100644 --- a/src/server.php +++ b/src/server.php @@ -68,11 +68,11 @@ $server->setHandler( $response = new \Yggverse\TitanII\Response(); $response->setCode( - 20 + $config->gemini->response->default->code ); $response->setMeta( - 'text/gemini' + $config->gemini->response->default->meta ); // Route begin