Redirect to page with custom header

I’m trying to add a custom response header (X-Robots-Tag: noindex) to a redirect that is called in my route config.

These are my two failing examples:

    kirby()->response()->header('X-Robots-Tag', 'noindex');
    go($pageUrl);

and

    Header::create('X-Robots-Tag', 'noindex');
    go($pageUrl);

Is there a kirby way to combine the redirection with a custom header?

Thanks
René

$kirby
->response()
->header('X-Robots-Tag', 'noindex')
->redirect('notes', 302);

This was quick and it’s working, too. Thanks a lot :slight_smile: