You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #383. redirect refuses a terminal /* (only accepted on static/extension) and {rest...} is not a valid parameter name; confirmed by running urlcode validate against both. This is the first path-shape exception to "exact or {param}, no general-purpose wildcard" in ROUTING.md, so it needs a maintainer decision before implementation.
Proposed shape: a route key ending /**, accepted only under redirect (e.g. /legacy/**), matching one or more remaining segments as a single named capture, usable once in the destination path as {**}. The capture is encoded as its segments joined by /, not re-decoded — a %2F in the input stays literal in the placeholder and cannot introduce an extra segment on redirect.
Effects:validate/explain/routes/audit show it like any parameterized redirect. Ordering must place a /** route after every literal and single-placeholder route at the same prefix, so nothing overshadows a more specific match.
Security: the destination is still checked as a literal absolute HTTP(S) host, so this only relaxes the source path shape — a capture only ever lands in the destination path, never the host or scheme, keeping it closed to open-redirect abuse from the captured value. Also reject a capture equal to ./.. segments and cap total captured length.
Until decided: report the gap; the tested workaround is one fixed-depth route per depth, or urlcode bulk-import for a known finite set of paths.
Full analysis: docs/OPEN-DECISIONS.md ("Wildcard-suffix redirect" row).
Implemented in f9bd0ae (feat: root-relative redirect destinations and /** suffix wildcard, part of #383). A route key ending /** is now accepted under redirect, capturing the remaining segments as {**} in the destination path, with the safety guards this issue proposed (host/scheme always literal, no dot-segment or encoded-slash smuggling, ordering behind exact/{param} routes). See ROUTING.md and the "Wildcard-suffix redirect" row in docs/OPEN-DECISIONS.md.
Activity
jimhoyd commentedon Sep 21, 2026
Benchmark evidence update (Redirector v8, pinned @jimhoyd/[email protected]): the completed URLCode arm passed the frozen two-segment /legacy/a/b redirect check using four explicit fixed-depth routes and one custom function. Its evidence map records that the workaround supports one through four segments only; deeper paths remain unverified. This validates the stated temporary workaround, not native wildcard support. Public redacted evidence: https://github.com/jimhoyd-com/urlcode-benchmarks/tree/codex/benchmark-program/results/bundles/2026-09-21-redirector-sonnet-v8
jimhoyd commentedon Sep 22, 2026
Implemented in f9bd0ae (feat: root-relative redirect destinations and /** suffix wildcard, part of #383). A route key ending
/**is now accepted underredirect, capturing the remaining segments as{**}in the destination path, with the safety guards this issue proposed (host/scheme always literal, no dot-segment or encoded-slash smuggling, ordering behind exact/{param} routes). See ROUTING.md and the "Wildcard-suffix redirect" row in docs/OPEN-DECISIONS.md.