Skip to content

Feature request: specify proc/lambda for request filter? #9

Description

@fj

The current implementation allows for the path configuration option to be a string; this string is then checked to see if the request path is prefixed by this string, and if not, the request is ignored.

Instead of that, what if there was a handler configuration option which accepted a block and was passed the request? If the result of evaluating the block is true, the resource for this request is considered protected; otherwise, it isn't. The default implementation of handler is to check whether the request is under the protected path or not.

This would allow for protection of resources in a manner other than only one path (e.g. if the resource is under any one of a discrete set of paths, or if you're asking for a particular form of a resource, or if your request is to transmit a normally encrypted resource in an unencrypted manner, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions