Skip to content

Kirby 3.7.5

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');
      }
    ]
  ]
];