![]() |
| > Home > Documentation > Latest documentation > Local config directives > RobotLimit |
|
RobotLimitSpecify the maximum number of pages a user can visit without a short pause. Also sets a limit on the number of unique sessions that can be created for a single IP address over a given period of time. Synopsis
The parameter is expected to be a positive integer. The default is zero (no limit). ScopeThis directive is only available for use in the local (catalog.cfg) configuration file. It will not affect any other website in any way. This directive will not work in the global (interchange.cfg) configuration file. DescriptionThis directive defines the number of consecutive pages a user session may access without a 30 second pause. If the limit is exceeded then the following will happen:
The above-mentioned 30 second pause can be configured using the Limit directive's "lockout_reset_seconds" setting. If a remote client gets assigned a new session with every visit, rather than maintaining a single session, then this directive sets the limit for the number of sessions that may be assigned to the individual IP address over a one hour period. The one hour period can be overridden using the Limit directive's "ip_session_expire" setting (value specified in minutes). If a lockout is triggered it will remain in effect for 24 hours. The 24 hour period can be overridden with the Limit directive's "robot_expire" setting, as shown below.
If a "lockout" SpecialSub is defined then that subroutine will be called to determine whether the lockout should be overridden for this user. If the "lockout" SpecialSub returns a true value then the current user will not be locked out of your website. ExamplesSetting the "bad robot" limit
Reducing the required pause time
Overriding the default 24-hour lockout time
The above will reduce the lockout time from 24 hours to just under one hour. Adding a hook to determine whether a lockout should occur at all
The above code will return the value of the "override_lockout" scratchpad variable. If the value is true (defined value that is not zero and not blank) then the user will not be locked out for exceeding the RobotLimit. See also
|
| Home | Legal nonsense | Privacy policy | Contact us |