Skip to content
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.7: url-matching.md - Prefix match - amend env var reference (#5866) #5872

Conversation

buger
Copy link
Member

@buger buger commented Jan 7, 2025

User description

url-matching.md - Prefix match - amend env var reference (#5866)


PR Type

Documentation


Description

  • Corrected the environment variable reference in url-matching.md.

  • Updated documentation for prefix matching configuration.

  • Improved clarity on the impact of the configuration option.


Changes walkthrough 📝

Relevant files
Documentation
url-matching.md
Corrected environment variable reference in documentation

tyk-docs/content/getting-started/key-concepts/url-matching.md

  • Corrected the environment variable name from
    TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHSUFFIXMATCHING to
    TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHPREFIXMATCHING.
  • Updated references in two instances within the prefix matching
    section.
  • Ensured documentation aligns with the correct configuration option.
  • +2/-2     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @buger buger enabled auto-merge (squash) January 7, 2025 12:45
    Copy link
    Contributor

    github-actions bot commented Jan 7, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    5866 - Fully compliant

    Fully compliant requirements:

    • Amend the environment variable reference in url-matching.md to TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHPREFIXMATCHING.

    Not compliant requirements:
    []

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Documentation Accuracy

    Verify that the updated references to TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHPREFIXMATCHING are accurate and consistent with the intended configuration behavior.

    When [TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHPREFIXMATCHING]({{< ref "tyk-oss-gateway/configuration#http_server_optionsenable_path_prefix_matching" >}}) is enabled, the Gateway switches to prefix matching where it treats the configured pattern as a prefix which will only match against the beginning of the path. For example, a pattern such as `/json` will only match request URLs that begin with `/json`, rather than matching any URL containing `/json`.
    
    The gateway checks the request URL against several variations depending on whether path versioning is enabled:
    
    - Full path (listen path + version + endpoint): `/listen-path/v4/json`
    - Non-versioned full path (listen path + endpoint): `/listen-path/json`
    - Path without version (endpoint only): `/json`
    
    The logic behind prefix matching is that it prepends the start of string symbol (`^`) if the URL begins with a `/`, to ensure that the URL begins with the specified pattern. For example, `/json` would be evaluated as `^/json`.
    
    For patterns that already start with `^`, the gateway will already perform prefix matching so `TYK_GW_HTTPSERVEROPTIONS_ENABLEPATHPREFIXMATCHING` will have no impact.

    Copy link
    Contributor

    github-actions bot commented Jan 7, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link

    netlify bot commented Jan 7, 2025

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit 0e30748
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/677d21fb09c11f0008abc04f
    😎 Deploy Preview https://deploy-preview-5872--tyk-docs.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    @buger buger merged commit 2ab6983 into release-5.7 Jan 7, 2025
    9 checks passed
    @buger buger deleted the merge/release-5.7/0550a3cd41d44ae1f22d311796f7549f1074c740 branch January 7, 2025 12:48
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants