Skip to content

add support for prefix and regex lookup#2

Open
hachi029 wants to merge 1 commit into
hamishforbes:masterfrom
hachi029:add-prefix-and-regex-lookup
Open

add support for prefix and regex lookup#2
hachi029 wants to merge 1 commit into
hamishforbes:masterfrom
hachi029:add-prefix-and-regex-lookup

Conversation

@hachi029

@hachi029 hachi029 commented Jun 13, 2026

Copy link
Copy Markdown

Add support for prefix and regex lookup.

Key changes include:

  • Added support for wildcard prefix matching using patterns like www.example.* or www.example.
  • Added support for regex matching using patterns starting with ~ such as ~^[a-z]+\.api\.example\.com$
  • Added support for removing entries via the remove method
  • Added support for retrieving multiple matches via the multi_lookup method
  • Improved matching logic to handle all pattern types with proper priority ordering

The implementation maintains backward compatibility while extending the hostname matching capabilities to support more complex use cases including:

  • Exact match: example.com
  • Wildcard suffix match: *.example.com or .example.com
  • Wildcard prefix match: www.example.* or www.example.
  • Regex match: ~^[a-z]+.example.com$
  • Longest match wins for wildcard patterns
  • Support for removing entries
  • Support for retrieving multiple matches

@hachi029 hachi029 force-pushed the add-prefix-and-regex-lookup branch 3 times, most recently from 908d9f8 to 16e66b9 Compare June 13, 2026 13:12
@hachi029 hachi029 force-pushed the add-prefix-and-regex-lookup branch from 16e66b9 to 4c965b3 Compare June 13, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant