I need to set a custom HTTP header to all responses from my Wicket application. I'm currently doing it in a custom RequestCycle, where getWebResponse() is overridden along these lines:
@Override
public WebResponse getWebResponse() {
WebResponse response = super.getWebResponse();
response.setHeader("X-custom", "..." );
return response;
}
This has worked great, until now that I've switched to using AjaxCheckBox (something like this) instead of normal CheckBox for certain configuration options.
My question is, is there an easy way to include my custom header also in Wicket's Ajax responses?