users@grizzly.java.net

Re: Remove Server Name and Version from header

From: Ryan Lubke <ryan.lubke_at_oracle.com>
Date: Wed, 22 Mar 2017 09:57:12 -0700

Please log an issue to track this. Also, in the report, please confirm
if you're using the Servlet module.

> Sidharth Reddy <mailto:sidharth.reddy_at_flexmoney.in>
> March 21, 2017 at 05:18
> Hi,
>
> I am trying to remove the Server header from Grizzly response. By
> setting response.setHeader("Server", ""); in the controller, i am able
> to set it to empty string for responses from the controller.
>
> However for any exceptions, I am unable to remove the server name from
> the exception responses.
>
> Setting the following config values
>
> HttpServer grizzlyHttpServer = new HttpServer()
> ServerConfiguration config = grizzlyHttpServer.getServerConfiguration();
> config.setHttpServerName("");
> config.setHttpServerVersion("");
>
> removes the server name from the title tag in the response html.
> However the server header is still present and shows as grizzly/2.3.24
>
>
> Any guidance on how to remove this from the exception headers will be
> greatly appreciated.
>
> Thanks,
> Sid