Aug
15
2006
Changing IntraWeb’s server identification string
Posted by in Miscellaneous, tags: IntraWeb, ServerControllerI’ve been asked a couple of times recently if it is possible to remove that “Server: Indy/10.0.52″ string, which is sent with every response in StandAlone mode.
You can set this string to any value you want.
To set the indetification string “Server: Indy/10.0.52″ with something else,
just add the follwoing to your ServerController’s create event:
Note: This applies to IntraWeb’s StandAlone mode only. You can
not change the string which is sent by IIS if you are using ISAPI
mode.
uses IWInit, IWGlobal, IWHTTPServer;
[...]
procedure TIWServerController.IWServerControllerBaseCreate(Sender: TObject);begin if assigned(GHTTPServer) and assigned(GHTTPServer.HTTP) then begin GHTTPServer.HTTP.Active := false; GHTTPServer.HTTP.ServerSoftware := 'fake'; GHTTPServer.HTTP.Active := true; end;end;
If your server uses HTTPS/SSL then apply the same to GHTTPServer.HTTPS as well.





Entries (RSS)