Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
both HTTP and HTTPS in same IW service app?
#3
Hi,

Not the answer from Atozed but still usable I hope Smile. Yes, this is possible.
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.
Reply


Messages In This Thread
RE: both HTTP and HTTPS in same IW service app? - by jeroen.rottink - 01-19-2024, 09:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)