I find Kirby’s routing very confusing when you want to do simpler stuff. I want to send a 410 header and return a response as if a certain page was rendered. I tried this:
The homepage is always rendered, regardless of the URL, which is expected. However, the status code is 200, instead of 410, even though I explicitly set it via Header::gone(). How to fix this?
The reason why Header::gone() does not work is that the response code that it sets is overridden by the one that Kirby sets when the page gets rendered. This is why we have our global response object that allows to set different kinds of header data.