Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(operator): New RESTPATH operator support #282

Merged
merged 1 commit into from
Jul 9, 2022
Merged

Conversation

jptosso
Copy link
Member

@jptosso jptosso commented Jul 9, 2022

Add support for @restpath operator

@respath takes a path pattern as a parameter, it processes the received URL and assigns variables to ARGS_PATH, ARGS_NAMES, and ARGS.

For example:

SecRule REQUEST_URI "@restpath /path/{some_id}" "…..chain"
    SecRule ARGS_PATH:some_id "!@eq %{user:session_id}" "deny"

The previous example will expect some_id to be the same as user:session_id.

This feature is a gamechanger for Coraza API security and it will allow much easier syntax for complex nested endpoints.

@jptosso jptosso added the enhancement New feature or request label Jul 9, 2022
@jptosso jptosso merged commit a86873b into v3/dev Jul 9, 2022
@jptosso jptosso deleted the v3/rest-support branch July 9, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant