Saturday, 20 April 2024
  4 Replies
  824 Visits
  Subscribe
Is it possible to set the server identifier (the one that is sent in the response header) to a custom value?
The component I tried to use is the TsgcWebSocketHTTPServer, and the default identifier is "sgcWebSockets" and the version nr.

I tried to add a handshake event, and replace that specific header ("Server"), but that did not do any difference.
8 months ago
·
#2020
Hello,

Use the property Options.Software to customize the value of the Server HTTP Header. This property is available from the sgcWebSockets 2024.4.0 version.


TsgcWebSocketHTTPServer.Options.Software := 'Server Name';


Kind Regards,
Sergio
8 months ago
·
#2021
Thanks for the quick reply!
I also tried, with the same event, to add a custom header, but also that does not seem to be sent to the client. It seems to all be replaced with the default headers. Is there also a way to add custom headers from the server that are sent in the same way?
8 months ago
·
#2022
This is what I added in the OnHandshake Event:

Headers.Add('Jonas: test');
8 months ago
·
#2024
Hello,

No, the Server header must be set with the property Options.Software, this is the only way.

Kind Regards,
Sergio
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf,pas,dfm,dpr,dproj,dpk
· Insert · Remove
  Upload Files (Maximum 10MB)