Closed enkomio closed 3 years ago
You can disable the server header in the configuration record.
https://github.com/SuaveIO/suave/blob/master/src/Suave/Web.fs#L92
Yeah I know, but in my project I need to send as Server
header a different string. For example, instead of sending the header:
Server: Suave (https://suave.io)
I'd like to send:
Server: My custom value
If I set hideHeader = true
and use addHeader "Server" "My custom value"
, the Server
header is not set due to the exclusions
list pointed in my previous comment. So, I was wondering if the server
string can be removed from the exclusions
list in the writeResponse
function or provide a mechanism to customize this list.
Ok, I've pushed a fix that allows you to set a custom Server header; you still need to set hideHeader = true
otherwise Suave will output the default Server string.
I'll release a new nuget later today or tomorrow.
Awesome, thanks!
I need to customize my server response, and in particular the server name. I see that the HTTP Server header value is set to a read only string and it is not possible to change it. Is this due to a specific reason?
What about removing the server header name from https://github.com/SuaveIO/suave/blob/master/src/Suave/HttpOutput.fs#L137?