01-19-2024, 09:48 AM
Hi,
Not the answer from Atozed but still usable I hope
. Yes, this is possible.
One way is to use the TIWServerController.OnBind event.
For https make sure SSLOptions.Port is set like for Indy servers.
Not the answer from Atozed but still usable I hope

One way is to use the TIWServerController.OnBind event.
Code:
procedure TIWServerController.IWServerControllerBaseBind(const aHttpBindings, aHttpsBindings: TStrings);
begin
aHttpBindings.Clear;
aHttpsBindings.Clear;
{$IFDEF DEBUG}
aHttpBindings.Add('http://*:80/');
{$ELSE}
aHttpBindings.Add('http://example.com:80/');
aHttpBindings.Add('http://www.example.com:80/');
aHttpsBindings.Add('https://example.com:443/');
aHttpsBindings.Add('https://www.example.com:443/');
{$ENDIF}
end;
For https make sure SSLOptions.Port is set like for Indy servers.