Sparkle and IIS on same server

Good Afternoon,

We have created a Delphi API using sparkle and XData which is running as a service on a webserver.
This webserver is also running IIS hosting multiple ISAPI modules written in .NET
Each module (including the Delphi API) is configured as a site with bindings to different domains using port 443 (HTTPS).

Until now was everything working just fine as the Delphi API was configured to port 80 (HTTP) but when I configure the Delphi API to use the HTTPS protocol on port 443.
As soon as the Delphi API is started/Active are all calls for the other API’s redirected to this API despite the calls made to the different host names.

The domain name and port and protocol are configured in the TXDataserver’s BaseURL property, see example below

XDataserver.BaseUrl := '';

You have to set THttpSysServer.KeepHostInUrlPrefixes property to True. This will solve your issue.

If you are manually creating the THttpSysServer, just set the property:

HttpSysServer.KeepHostInUrlPrefixes := True;

If you are using the TSparkleHttpSysDispatcher component, then use the HttpSys property to reference the object:

SparkleHttpSysDispatcher1.HttpSys.KeepHostInUrlPrefixes := True;