Closed buger closed 2 months ago
โฑ๏ธ Estimated effort to review: 2 ๐ต๐ตโชโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก No key issues to review |
API Changes
--- prev.txt 2024-09-20 11:15:39.566837650 +0000
+++ current.txt 2024-09-20 11:15:36.651847128 +0000
@@ -5905,47 +5905,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.
No code suggestions found for the PR.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
User description
TT-13128 Updated description for prefix and suffix matching config options (#6555)
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
.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
to clarify itsbehavior and provide examples.
EnablePathSuffixMatching
, explaining itsswitch from wildcard to suffix mode.
and suffix matching.
when enabling these options.