I am using Akka HTTP 10.0.15. Each response contains the header Server: akka-http/10.0.15. Is there any way to drop this header? I couldn't find anything in the list of directives.

1 Answers

Jeffrey Chung On Best Solutions

In your application.conf, set akka.http.server.server-header to the empty string:

akka.http.server.server-header = ""

From the reference configuration:

akka.http {

  server {
    # The default value of the `Server` header to produce if no
    # explicit `Server`-header was included in a response.
    # If this value is the empty string and no header was included in
    # the request, no `Server` header will be rendered at all.
    server-header = akka-http/${akka.http.version}