aspnet / HttpSysServer

[Archived] A web server for ASP.NET Core based on the Windows Http Server API. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
106 stars 39 forks source link

Remove Server header when using UseHttpSys() #445

Closed OnamChilwan closed 6 years ago

OnamChilwan commented 6 years ago

Is it possible to remove the Server header when using UseHttpSys()? I see the type HttpSysOptions but there doesn't seem to be an option which allows me to remove the header. Is this possible to do so within the app or is it highler level config?

Thanks.

Tratcher commented 6 years ago

https://blogs.msdn.microsoft.com/timomta/2016/12/03/how-to-remove-the-server-header-from-weblistener/

shirhatti commented 6 years ago

Triage decision: We won't be doing this in the server

abatishchev commented 6 years ago

@shirhatti can you please share the reasoning which overweighted the arguments from this discussion: https://github.com/aspnet/KestrelHttpServer/issues/852#issuecomment-220588416

Tratcher commented 6 years ago

HttpSysServer isn't the one adding the Server header, it's done by the lower level http.sys component and there's no API available for us to control that, only some workarounds like those mentioned in the blog.

abatishchev commented 6 years ago

I see, makes sense. The workaround didn't work for me. Most probably this is my local issue, as I'm testing cert client auth and getting 403 so the lambda to removed the header isn't called yet.