How to block RemoteDB connections with version numbering?

Hello

Is there a way to limit access to RemoteDB users with just a simply version number betwen the Server and Client?

Actually I only use "UserName and Password" properties between RemoteDB Server and RemoteDB Clients in order to link it, but in some way prior to any RemoteDB Client connection to the server I want to validate some kind of version number as for example:

  1. RemoteDB Server starts with version 1.0.0, so any RemoteDB Client must have the same 1.0.0 coded inside.
  2. If I want to release new features to the RemoteDB Client in a version 1.0.1, then I need to force my user to contact me in order to upgrade his RemoteDB Server to version 1.0.1, so both tiers must match the version number in order to connect.

I know changing the "username and password" can do the trick, but I want to see if there are some samples you can give me for version numbering validations.

Thanks

You can use the middleware system for that.

First you can use TRemoteDBDatabase.OnRequestSending event to add an HTTP header to the request with the client version number.

Then, server-side, you can add a custom middleware that checks for such header and version number, if wrong, just answer with a custom response (probably a 4xx code with a text response information a version mismatch).

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.