UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | mainResponder Verbs > mainResponder.security > blockHttpByIp

mainResponder.security.blockHttpByIP

Syntax mainResponder.security.blockHttpByIP ()

Params None required.

Action If config.mainResponder.prefs.flAllowByIpOnly is true, this script blocks all requests except those originating from IP addresses listed in config.mainResponder.prefs.allowedIpAddresses.

Returns True if the request was allowed, generates a script error otherwise.

Errors If the client's IP address is determined to be illegal, this script generates a scripterror that will instruct mainResponder.respond to return a 403 Forbidden response to the client.

Notes config.mainResponder.prefs.allowedIpAddresses should be a string containing a comma-delimited list of allowed IP addresses.

This script is intended to be called from config.mainResponder.callbacks.controlAccess.blockByIP. The contents of the param table for this request is assumed to be in scope.

Prev | Next | mainResponder Verbs > mainResponder.security > blockHttpByIp