Browse Source

add response settings

main
ghost 10 months ago
parent
commit
bfcad2caec
  1. 8
      example/config.json
  2. 4
      src/server.php

8
example/config.json

@ -16,6 +16,14 @@
{ {
"host":"127.0.0.1", "host":"127.0.0.1",
"port":1965 "port":1965
},
"response":
{
"default":
{
"code":20,
"meta":"text/gemini; charset=utf-8;"
}
} }
}, },
"memcached": "memcached":

4
src/server.php

@ -68,11 +68,11 @@ $server->setHandler(
$response = new \Yggverse\TitanII\Response(); $response = new \Yggverse\TitanII\Response();
$response->setCode( $response->setCode(
20 $config->gemini->response->default->code
); );
$response->setMeta( $response->setMeta(
'text/gemini' $config->gemini->response->default->meta
); );
// Route begin // Route begin

Loading…
Cancel
Save