Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read HTTP Header Field "Host"

we have an Intraweb Site (standalone application) where we would like to use TLS (HTTPS) encryption. We are planning to use two domains which will point to the same IP. The Intraweb application should react differently depending from which domain the request is coming (show different pages and use different certification files since certificates are depending on domain?)
I was told to use the HTTP Header Field "Host". How can I read this header field in Intraweb?
Hi, if you use iw 15+ with http.sys you be able to have a lot of applications running in same Domainserver with one certificate. Ex:

And you have one certificate:

Because http.sys use the same Domain information registered on windows with IIS or without IIS (directly via prompt).
Thank you, but how can I access the HTTP Header in Intraweb? Is it possible?
Hi, you have information you can handle like this:

procedure TIWServerController.IWServerControllerBaseNewSession(aSession: TIWApplication);
   ASession.Data := TIWUserSession.Create(nil, aSession);

   { Use ASession.Request to obtain a lot of information }
   if ASession.Request.HttpMethod = hmNone then begin
      ASession.Response.Code     := 405;
      ASession.Response.CodeText := 'Not Allowed';
One additional question: where is the right place to specify different certificate files if the request comes from different domains which point to the same IP. I can read the WebApplication.Request.Host to determine where the request comes from.
Alexandre will need to reply for an exact answer, but I don't believe SA supports multiple certificates or one per domain. You may need to use ISAPI or HTTP.SYS to do that. For SA you could also use IIS or Apache and use redirects from the other domains.

Forum Jump:

Users browsing this thread: 1 Guest(s)