<!-- XE-13358 · test.network proxy and direct node route the same URL path differently (trailing-slash / %2e%2e normalization divergence) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13358>. The page is the record; this is the same page for reading.*

XE-13358 · Bounty

# test.network proxy and direct node route the same URL path differently (trailing-slash / %2e%2e normalization divergence)

Triaging
claimed Minor
[xe#503](https://github.com/xeprotocol/xe/issues/503)
filed 2026-11-12 08:59 UTC
by rjuliant

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Minor

Area
:   Ops / testnet

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:17 UTC

Told
:   2026-11-20 00:15 UTC

### Patches

- [xe#505](https://github.com/xeprotocol/xe/pull/505) open by arturbarszcz78
  fix(api): normalize URL path and resolve dot segments across handlers (fixes #503)

### History

- [547547](https://bounty.xe.network/log/547547) 2026-11-20 00:16 UTC github.labels
- [546186](https://bounty.xe.network/log/546186) 2026-11-20 00:15 UTC reply.mirrored
- [545989](https://bounty.xe.network/log/545989) 2026-11-20 00:15 UTC proposal.adopted
- [545988](https://bounty.xe.network/log/545988) 2026-11-20 00:15 UTC reply.sent
- [545904](https://bounty.xe.network/log/545904) 2026-11-20 00:15 UTC proposal.adopted
- [545903](https://bounty.xe.network/log/545903) 2026-11-20 00:15 UTC ticket.status new → triaging
- [545821](https://bounty.xe.network/log/545821) 2026-11-20 00:15 UTC proposal.adopted
- [545820](https://bounty.xe.network/log/545820) 2026-11-20 00:15 UTC ticket.facts area
- [539808](https://bounty.xe.network/log/539808) 2026-11-20 00:00 UTC note.added
- [539807](https://bounty.xe.network/log/539807) 2026-11-20 00:00 UTC proposal.created
- [539806](https://bounty.xe.network/log/539806) 2026-11-20 00:00 UTC proposal.created
- [539805](https://bounty.xe.network/log/539805) 2026-11-20 00:00 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-13358) · [JSON](https://bounty.xe.network/v1/tickets/XE-13358) · [markdown](https://bounty.xe.network/XE-13358.md)

### Report

## Summary

The two documented-equivalent API surfaces — the versioned proxy (`https://test.network/api/v1`) and the direct node (`https://ldn.core.test.network`) — route the *same URL path* to different results, because the proxy normalizes the URL (trailing slash, `%2e%2e` dot-segments, `..` collapsing) while the node does not.

## Where

- Proxy: `https://test.network/api/v1/*` (nginx front, normalizes path before forwarding).
- Direct: `https://ldn.core.test.network/*` (Go `http.ServeMux`, no normalization).
- OpenAPI states both expose "the same JSON HTTP API" (`servers` list marks them equivalent).

## What I observed

| Request | direct node | proxy |
| --- | --- | --- |
| `GET /node/` (trailing slash) | `404 page not found` | `200` (or `308` redirect) — full node info |
| `GET /statechain/kv/` (empty wildcard) | `400 {"error":"missing key"}` | `200` full governance KV map |
| `GET /statechain/kv/sys.network_id/` (trailing slash) | `404 {"error":"key not found"}` | `200 {key:sys.network_id, value:testnet-0005}` |
| `GET /statechain/kv/%2e%2e/sys.network_id` | `404 "key not found"` (literal key) | `404 {"code":"not_found","message":"No API route at /api/v1/statechain/sys.network_id"}` (nginx decoded `%2e%2e` → `../` and collapsed it) |

The proxy strips trailing slashes and decodes/collapses dot-segments before forwarding; the node treats both literally (`{key...}` wildcard, exact path match).

## Impact

Integrations that pin one surface cannot rely on equivalent routing between the two — a path that resolves on the proxy 404s (or hits a different handler) on the direct node and vice-versa. It is a consistency/interpretation conflict between the two advertised-equivalent surfaces. No auth or trusted-boundary escape: `%2e%2e` collapses *inside* `/api/v1` (it does not escape the `/api` prefix or reach another service; `/api/v1/../../node` → SPA 404).

## Reproduce

```
curl -s -o /dev/null -w '%{http_code}\n' https://ldn.core.test.network/node/
curl -s -o /dev/null -w '%{http_code}\n' https://test.network/api/v1/node/
```

## Severity

Minor — inconsistent API responses / path-equivalence divergence between the two documented-equivalent surfaces.

### Thread

**Joseph Denne**team2026-11-20 00:15 UTCgithub

Thanks for the report. We have read it and are checking how the hosted proxy handles these paths against what the node does. We will update this ticket when there is more to share.
