Server header
See original GitHub issueThis should be optional.
ctx.header(Header.SERVER, "Javalin")
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Server - HTTP - MDN Web Docs
The Server header describes the software used by the origin server that handled the request — that is, the server that generated the...
Read more >HTTP headers | Server - GeeksforGeeks
The HTTP Server header is a response-type header that contains the information about the used software by the server to handle all the ......
Read more >List of HTTP header fields - Wikipedia
HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and...
Read more >What is the HTTP "Server" response-header field used for?
The Server response-header field contains information about the software used by the origin server to handle the request.
Read more >Server: HTTP response-header - IBM
Returns information about the server and protocol the client is connected to. Type, Description. HTTP header name, Server. HTTP header type, Response-header.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @mekiert !
In Javalin 4, which is coming out soon, the Server header is disabled by default 😃
There is a way to remove it. I show my solution using Kotlin.
Remove ‘Server’ header from Javalin To remove a ‘Server’ header from Javalin we can set its value to null, just after handling the request.
Now instead of ‘Server = Javalin’ you should see a header ‘Server = Jetty(xxxx)’.
Remove ‘Server’ header from Jetty As the ‘Server’ header from Javalin was only a cover for header from Jetty, you should remove the ‘Server’ header from Jetty as well.
This code does the job:
Based on: https://stackoverflow.com/a/23245256
Explanation:
That’s it! You are free from the ‘Server’ header now! 😎
Message to maintainer/s 🛠 In my opinion, the Javalin ‘Server’ header should be set only if it was previously set by Jetty. It is pointless to set this header to ‘Javalin’ and then to remove it.
Btw, thanks for your great job with Javalin 👍