Skip to content

Feature: Http Wildcard Routes#174

Open
sephynox wants to merge 3 commits intomainfrom
feat/http-wildcard-routes
Open

Feature: Http Wildcard Routes#174
sephynox wants to merge 3 commits intomainfrom
feat/http-wildcard-routes

Conversation

@sephynox
Copy link
Contributor

@sephynox sephynox commented Feb 3, 2026

Summary

This PR adds support for wildcard routes in the KeetaNetAnchorHTTPServer class, enabling routes to capture variable-depth path segments.

Changes

  • Routes ending with /* now match any path that extends beyond the prefix

@sephynox sephynox requested review from Copilot and rkeene February 3, 2026 18:27
@sephynox sephynox self-assigned this Feb 3, 2026
@sephynox sephynox added the enhancement New feature or request label Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds wildcard route support to the HTTP server, allowing routes ending with /* to match requests with variable-depth path segments beyond the prefix. The implementation prioritizes exact route matches over wildcard matches.

Changes:

  • Modified routeMatch to detect and handle wildcard routes (routes ending with /*)
  • Updated routeFind to prioritize exact matches over wildcard matches
  • Added test cases for wildcard functionality and exact-match priority

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/lib/http-server/index.ts Implements wildcard route matching logic with prefix validation, parameter capture, and prioritization of exact matches over wildcard matches
src/lib/http-server/index.test.ts Adds test cases for wildcard routes, including variable-depth paths and verification that exact routes take priority over wildcards

@sephynox sephynox force-pushed the feat/http-wildcard-routes branch from 3340788 to 8053c1a Compare February 3, 2026 19:52
@sephynox sephynox changed the base branch from feat/encrypted-container-v3 to main February 3, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant