You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.).
The text was updated successfully, but these errors were encountered:
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 ofhandler
is to check whether the request is under the protectedpath
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.).
The text was updated successfully, but these errors were encountered: