Skip to content

Trace requests through Next.js Axios proxies - #157

Open
passosiago wants to merge 1 commit into
haydenschmitty:mainfrom
passosiago:fix/trace-nextjs-axios-proxies
Open

passosiago wants to merge 1 commit into
haydenschmitty:mainfrom
passosiago:fix/trace-nextjs-axios-proxies

Conversation

@passosiago

Copy link
Copy Markdown

What this changes

Links a browser request through a Next.js Pages Router catch-all to the backend handler. The scanner follows the Axios base path and the proxy's forwarding code when the backend has a unique matching literal route. Screens follows the request through nested hooks and shows the proxy between the browser call and the handler.

How I tested it

The synthetic example uses a Next.js inventory page and a NestJS API in separate repositories. It verifies that a browser request to GET /api/relay/inventory/availability goes through the catch-all to GET /inventory/availability. The regression tests also cover competing backend routes and more specific local routes.

Checklist

  • Synthetic fixtures and generic examples
  • npm test
  • claude plugin validate .
  • CHANGELOG.md updated

Keep both HTTP hops on the map when a Pages Router catch-all forwards an Axios request to a uniquely matching backend. Follow the hooks that make the request in Screens and cover ambiguous routes with synthetic inventory fixtures.
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