LoginSignup
5
5

More than 5 years have passed since last update.

SprayのServerヘッダを変更したい

Posted at

spray.can.server.server-headerの設定をapplication.confに書くとServerヘッダの内容を変更できる。

application.conf
spray.can {
  server {
    server-header = "MyServer/1.0"
  }
}

HTTPのヘッダはこんなかんじに。

GET /ping

レスポンス:

HTTP/1.1 200 OK
Content-Length: 2
Content-Type: text/plain; charset=UTF-8
Date: Wed, 24 Sep 2014 10:17:28 GMT
Server: MyServer/1.0

ok
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5