Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Main form in Secure mode
#2
Not sure if you are using Http.sys or Indy, anyway, these are the general things you need to configure (copied from another thread):

In this case, you just need to set:


Code:
ServerController.Port := (your HTTP port, default is 80)
ServerController.SSLOptions.Port := (your HTTPS port, default is 443)


What will determine the behavior of the application is the property

ServerController.SSLOptions.NonSSLRequest

It can be either: nsAccept (default), nsRedirect and nsBlock

nsAccept: incoming requests using HTTP port will be accepted and everything will run using HTTP only protocol
nsRedirect: any incoming request using HTTP port will be redirected to HTTPS port (if HTTPS is enabled, i.e. you have ServerController.SSLOptions.Port > 0)
nsBlock: any incomping request using HTTP port will be blocked. In this case the HTTP server won't even listen to the HTTP. No response for HTTP request will be generated.

You can also have forms that are only accessible via HTTPS or HTTP and others that are accessibla via both protocols. In that case you need to use the property

IWForm.ConnectionMode

It can be either:

cmAny (default): HTTP and HTTPS are accepted
cmSecure: Form will only accept HTTPS
cmNonSecure: Form will only accept HTTP


The most common scenario is setting the whole application to work full time using HTTPS. In this case you should set:

1) ServerController.SSLOptions.Port = 443

2) ServerController.SSLOptions.NonSSLRequest  = nsRedirect

3) All IWForms.ConnectionMode = cmSecure

That's it. If the certificate is properly installed (it varies according to the application type), it will "just work"
Reply


Messages In This Thread
Main form in Secure mode - by Comograma - 01-22-2024, 06:01 PM
RE: Main form in Secure mode - by Alexandre Machado - 01-22-2024, 08:58 PM
RE: Main form in Secure mode - by Comograma - 01-23-2024, 11:17 AM
RE: Main form in Secure mode - by Comograma - 01-23-2024, 03:57 PM
RE: Main form in Secure mode - by Comograma - 01-24-2024, 12:52 PM
RE: Main form in Secure mode - by Comograma - 01-26-2024, 01:04 PM
RE: Main form in Secure mode - by Comograma - 02-01-2024, 10:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)