04-17-2023, 08:18 PM
(This post was last modified: 04-18-2023, 07:57 PM by Alexandre Machado.)
If you just set the vCanCreate parameter to False, IW will take care of that for you responding with the SessionOptions.HttpStatusForDeniedSessions response code, which is by default 404, the most recommended for this situation.
IMO this is the closest to "pretend that it doesn't exist" that you can get after receiving the request (because the other side, the browser, knows that your server effectively exists because it accepted a connection and the request)
Code:
procedure TIWServerController.IWServerControllerBaseBeforeNewSession(
const aUrlPath: string; aRequest: THttpRequest; out vCanCreate: Boolean);
begin
vCanCreate := False;
end;IMO this is the closest to "pretend that it doesn't exist" that you can get after receiving the request (because the other side, the browser, knows that your server effectively exists because it accepted a connection and the request)

