Skip to content

Kirby 4.4.1

Response

A custom Response object can be returned to gain full control over the response type.

/site/config/config.php
return [
  'routes' => [
    [
      'pattern' => 'custom/response',
      'action'  => function () {
        return new Response('<foo>bar</foo>', 'text/html');
      }
    ]
  ]
];