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.
Most URL patterns behave nicely with Zap as-is, but there are a few exceptions. One gap I've encountered is with URLS that embed version numbers as path elements; for example, the Apache Kafka docs use the major and minor version number concatenated (with no dot delimiter) as their first path element and each version of their docs so far has followed the same pattern for where javadocs, quickstarts, configuration docs, etc. are found.
I've had to install several redundant redirects in my Zap config to work with this:
However, that's clearly a workaround and it'd be nice if Zap recognized URL patterns like this natively.
As a light first pass at addressing this issue, I'd like to propose that the special path of
"*"
be allowed to match any path element that isn't explicitly matched in the config file. Should this match occur, the path element will then be kept as-is, but also allow for expansion of the remaining path elements.An example is included in the README, and a few tests are added that should also help demonstrate the intended functionality. To put things into context, the above config snippet could now be reduced to: