Support multiple request_uri values and prevent duplicates across rules - #12
Merged
maclarel merged 4 commits intoFeb 5, 2026
Merged
Conversation
Co-authored-by: maclarel <21298298+maclarel@users.noreply.github.com>
…e tests Co-authored-by: maclarel <21298298+maclarel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update rule configuration to allow multiple request_uri values
Support multiple request_uri values and prevent duplicates across rules
Jan 29, 2026
maclarel
marked this pull request as ready for review
February 5, 2026 20:36
maclarel
deleted the
copilot/update-request-uri-to-support-multiple-values
branch
February 5, 2026 20:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rules can now define duplicate
request_urivalues across files, causing ambiguous routing. Additionally, serving the same file from multiple paths requires creating separate rule files.Changes
Multiple URI support:
request_uriaccepts both single string and array syntax. Multiple URIs use OR logic.Duplicate detection: Server validates
request_uriuniqueness across all rules at startup and during hot reloads. Exits with FATAL error on duplicates during startup; logs error and keeps existing rules during reload.Normalization helper: Added
normalize_to_list()to handle single/array/None values consistently acrossrequest_uri,header_value, andsource_ipfields.Testing
Added 6 tests covering multiple URI validation, duplicate detection (single and array), empty URI handling, and integration with existing rule conditions.
Backward Compatibility
Existing single-string
request_urivalues continue to work unchanged.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.