-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Merging to release-5.3: [TT-13128] Updated description for prefix and suffix matching config options (#6555) #6556
Merged
lghiur
merged 1 commit into
release-5.3
from
merge/release-5.3/4a7bba90db33093a19281b5ba1a59f5ea1972faa
Sep 23, 2024
Merged
Merging to release-5.3: [TT-13128] Updated description for prefix and suffix matching config options (#6555) #6556
lghiur
merged 1 commit into
release-5.3
from
merge/release-5.3/4a7bba90db33093a19281b5ba1a59f5ea1972faa
Sep 23, 2024
Conversation
This file contains 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
…options (#6555) ### **PR Type** documentation ___ ### **Description** - Updated the documentation for `EnablePathPrefixMatching` to clarify its behavior, including how it changes URL matching from wildcard to prefix mode. - Enhanced the description for `EnablePathSuffixMatching`, explaining its switch from wildcard to suffix mode. - Added examples to illustrate the differences between wildcard, prefix, and suffix matching. - Noted the potential need for adjustments in existing route definitions when enabling these options. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>config.go</strong><dd><code>Clarify and enhance documentation for path matching options</code></dd></summary> <hr> config/config.go <li>Updated descriptions for <code>EnablePathPrefixMatching</code> and <br><code>EnablePathSuffixMatching</code>.<br> <li> Clarified the behavior of prefix and suffix matching.<br> <li> Provided examples for both matching options.<br> <li> Explained the impact on existing route definitions.<br> </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6555/files#diff-fe44f09c4d5977b5f5eaea29170b6a0748819c9d02271746a20d81a5f3efca17">+35/-39</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions (cherry picked from commit 4a7bba9)
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨No code suggestions found for the PR. |
API Changes --- prev.txt 2024-09-20 11:14:26.872064949 +0000
+++ current.txt 2024-09-20 11:14:24.028052839 +0000
@@ -5514,47 +5514,10 @@
// Regular expressions and parameterized routes will be left alone regardless of this setting.
EnableStrictRoutes bool `json:"enable_strict_routes"`
- // EnablePathPrefixMatching changes the URL matching from wildcard mode to prefix mode.
- // For example, `/json` matches `*/json*` by current default behaviour.
- // If prefix matching is enabled, the match will be performed as a prefix match (`/json*`).
- //
- // The `/json` url would be matched as `^/json` against the following paths:
- //
- // - Full listen path and versioning URL (`/listen-path/v4/json`)
- // - Stripped listen path URL (`/v4/json`)
- // - Stripped version information (`/json`) - match.
- //
- // If versioning is disabled then the following URLs are considered:
- //
- // - Full listen path and endpoint (`/listen-path/json`)
- // - Stripped listen path (`/json`) - match.
- //
- // For inputs that start with `/`, a prefix match is ensured by
- // prepending the start of string `^` caret.
- //
- // For all other cases, the pattern remains unmodified.
- //
- // Combine this option with `enable_path_suffix_matching` to achieve
- // exact url matching with `/json` being evaluated as `^/json$`.
+ // Combining EnablePathPrefixMatching with EnablePathSuffixMatching will result in exact URL matching, with `/json` being evaluated as `^/json$`.
EnablePathPrefixMatching bool `json:"enable_path_prefix_matching"`
- // EnablePathSuffixMatching changes the URL matching to match as a suffix.
- // For example: `/json` is matched as `/json$` against the following paths:
- //
- // - Full listen path and versioning URL (`/listen-path/v4/json`)
- // - Stripped listen path URL (`/v4/json`)
- // - Stripped version information (`/json`) - match.
- //
- // If versioning is disabled then the following URLs are considered:
- //
- // - Full listen path and endpoint (`/listen-path/json`)
- // - Stripped listen path (`/json`) - match.
- //
- // If the input pattern already ends with a `$` (`/json$`)
- // then the pattern remains unmodified.
- //
- // Combine this option with `enable_path_prefix_matching` to achieve
- // exact url matching with `/json` being evaluated as `^/json$`.
+ // Combining EnablePathSuffixMatching with EnablePathPrefixMatching will result in exact URL matching, with `/json` being evaluated as `^/json$`.
EnablePathSuffixMatching bool `json:"enable_path_suffix_matching"`
// Disable TLS verification. Required if you are using self-signed certificates. |
Quality Gate passedIssues Measures |
lghiur
deleted the
merge/release-5.3/4a7bba90db33093a19281b5ba1a59f5ea1972faa
branch
September 23, 2024 08:02
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.
User description
TT-13128 Updated description for prefix and suffix matching config options (#6555)
PR Type
documentation
Description
EnablePathPrefixMatching
to clarifyits behavior, including how it changes URL matching from wildcard to
prefix mode.
EnablePathSuffixMatching
, explainingits switch from wildcard to suffix mode.
and suffix matching.
when enabling these options.
Changes walkthrough 📝
config.go
Clarify and enhance documentation for path matching options
config/config.go
EnablePathPrefixMatching
andEnablePathSuffixMatching
.PR Type
Documentation
Description
EnablePathPrefixMatching
to clarify its behavior, including how it changes URL matching from wildcard to prefix mode.EnablePathSuffixMatching
, explaining its switch from wildcard to suffix mode.Changes walkthrough 📝
config.go
Clarify and enhance documentation for path matching options
config/config.go
EnablePathPrefixMatching
andEnablePathSuffixMatching
.