Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRevenitng a session from being created in OnBeforeDIspatch
#4
For future reference, this was the response on the Telegram channel:

OnBeforeDispatch does happen multiple times. Each request/response goes through OnBeforeDispatch. During application start up multiple requests are sent to the server. There is nothing wrong there

If you want to block a request before it creates a new session IW 15 gives you the OnBeforeNewSession event


TOnBeforeNewSessionEvent = procedure(const aUrlPath: string; aRequest: THttpRequest; out vCanCreate: Boolean) of object;


Just set vCanCreate to false and the user will get a 404, and no session will be created
Reply


Messages In This Thread
RE: PRevenitng a session from being created in OnBeforeDIspatch - by Alexandre Machado - 10-22-2019, 08:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)