Parse capture groups in if-blocks. Fixes #50.#51
Parse capture groups in if-blocks. Fixes #50.#51MegaManSec wants to merge 8 commits intodvershinin:masterfrom
Conversation
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for parsing capture groups in nginx if-blocks by implementing variable extraction from regex patterns. This enhancement fixes issue #50 by enabling proper handling of regex capture groups that can be referenced within if-blocks.
- Modifies IfBlock class to provide variables from regex capture groups
- Adds regex detection and variable extraction functionality
- Updates test expectations to reflect new variable provision behavior
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gixy/directives/block.py | Implements variable extraction logic for if-blocks with regex patterns |
| tests/directives/test_block.py | Updates test assertion to expect variable provision in if-blocks |
| tests/plugins/simply/http_splitting/if_block.conf | Adds test case for if-block with capture group using $uri |
| tests/plugins/simply/http_splitting/if_block_fp.conf | Adds test case for if-block with capture group using $request_uri |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
fixed the merge conflict |
|
|
Thank you for this contribution! The feature has been rebased and adapted for the current crossplane-based parser in #91. Closing this PR in favor of the rebased version. |



No description provided.