#1 2025-04-11 17:24:09

coding_for_fun
Member
Registered: 2025-04-11
Posts: 1

How to add 'https' support to an TSQLHttpServer component?

We have a Delphi application that uses mORMot v. 1.18 to create a HTTP Server. Since the current iteration of the application does not use 'https,' I have been asked to modify the application so that is uses 'https' rather than 'http' as its communication protocol.

It is my first experience with mORMot and I am slightly lost. After reading the documentation, it seems that modifying our current call to 'TSQLHttpServer.Create()' from:

iHttpServer := TSQLHttpServer.Create('8089', [iRestServerDB], '+', HTTP_DEFAULT_MODE);

to:

iHttpServer := TSQLHttpServer.Create(/8443', [iRestServerDB], '+', HTTP_DEFAULT_MODE, 32, TSQLHttpServerSecurity.secSSL);

with:

iRestServerDB := TSQLRestServerDB.Create(iModel, ':memory:', false);

would be part of the solution.

Am I on the right track?

According to the documentation, in order to let the SSL layer work as expected, one needs first to create and import a set of certificates. Is it possible to use the same certificates for the development side of the application and the release side of it if both sides reside on a different PC?

Offline

Board footer

Powered by FluxBB