Closed phatify closed 4 months ago
I've found the examples provided elsewhere don't work correctly on the first request. The first request triggers .on('upgrade') registration, causing subsequent requests to succeed. But the first request hangs indefinitely.
@justin-together could you give concrete urls to the examples you are referring to?
Here you can find a Next.js recipe: https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md#nextjs
Documentation to subscribe to upgrade
event manually:
https://github.com/chimurai/http-proxy-middleware/blob/master/README.md#external-websocket-upgrade
Happy to hear what kind of document is missing and can be improved
Describe the feature you'd love to see
Add documentation for http proxy middleware in API Routes Nextjs
Additional context (optional)
No response