Skip to content

Route endpoint:anything header to /anything handler#12

Merged
BrooksCunningham merged 2 commits into
mainfrom
copilot/add-endpoint-request-processing
Jun 3, 2026
Merged

Route endpoint:anything header to /anything handler#12
BrooksCunningham merged 2 commits into
mainfrom
copilot/add-endpoint-request-processing

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Adds header-driven endpoint selection for request inspection: when endpoint:anything is present, the request is handled by the anything endpoint regardless of URL path. This aligns header-based endpoint overrides with existing routing behavior while keeping changes minimal.

  • Handler routing update

    • In handler, added explicit header match for endpoint:anything and route immediately to anything(req, resp).
    • Uses exact match (ep == "anything") to avoid accidental matches on unrelated header values.
  • Endpoint override docs

    • Updated handler docs to include endpoint:anything as a supported custom-header route override.
    • Added README example showing request-inspection routing from arbitrary paths via header.
curl https://http-me.edgecompute.app/any/path \
  -H 'endpoint:anything'

Copilot AI changed the title Add endpoint header routing for anything endpoint Route endpoint:anything header to /anything handler Jun 3, 2026
Copilot AI requested a review from BrooksCunningham June 3, 2026 13:32
@BrooksCunningham BrooksCunningham marked this pull request as ready for review June 3, 2026 13:39
@BrooksCunningham BrooksCunningham merged commit 6d7f04d into main Jun 3, 2026
2 checks passed
@BrooksCunningham BrooksCunningham deleted the copilot/add-endpoint-request-processing branch June 3, 2026 15:43
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.

2 participants