You are not logged in.
Pages: 1
I need to add a find method to the TURiRouter class to determine whether it exists in the OnBeforeBody event. If it does not, access will be denied.
function TURiRouter.Find(const aUri, aMethod: RawUtf8): TUriTreeNode;
or
function TURiRouter.Find(const aUri, aMethod: RawUtf8): TUriTreeNodeData;
Is the proposal feasible
If possible, it is best to temporarily store the find results for use by THttpServerRequest, such as: THttpServerRequest. fRoute?
Last edited by redhan_xp (2023-03-23 01:15:51)
Offline
Please try
https://github.com/synopse/mORMot2/commit/29742ef6
Note that it will work only for plain HTTP server, not if you use any TRestServer, or a custom Request() processing method.
TRestServer has its own routing mechanism, called after THttpServerGeneric's TUriRouter.
Offline
Thank you ab, I only use the THttpServerGeneric framework
Last edited by redhan_xp (2023-03-23 15:06:22)
Offline
Pages: 1