06-20-2020, 03:00 AM
(This post was last modified: 06-20-2020, 03:01 AM by Alexandre Machado.)
In ServerController, there is an event (in newer IW 15.x at least) that is made for that:
Set variable vFileAccess to one of these values:
TIWCacheFileAccess = (faGrant, faDeny, faRequireSession);
aURLPath contains the requested URL (including the file name).
You can grant, deny or require the user session to be established. In faRequireSession case, the file will only be served if the user has already a valid session.
Code:
procedure TIWServerController.IWServerControllerBaseValidateCacheFileAccess(const aUrlPath: string; var vFileAccess: TIWCacheFileAccess);
begin
end;
Set variable vFileAccess to one of these values:
TIWCacheFileAccess = (faGrant, faDeny, faRequireSession);
aURLPath contains the requested URL (including the file name).
You can grant, deny or require the user session to be established. In faRequireSession case, the file will only be served if the user has already a valid session.