Any ideas how to use websockets in rewrites
Unanswered
Lilac posted this in #help-forum
LilacOP
I am running Next.js v15.0.3
support was apparently added in [v14.3.0-canary.64](https://github.com/vercel/next.js/releases/tag/v14.3.0-canary.64) for websockets in rewrites, but I can't seem to get it working any ideas?
things ive tried:
using http
using ws://
any other ideas on how I can get websockets working for rewrites?
it may also be a good idea to note that yes, ive tested that other rewrites work just fine and that the websocket server works fine too
support was apparently added in [v14.3.0-canary.64](https://github.com/vercel/next.js/releases/tag/v14.3.0-canary.64) for websockets in rewrites, but I can't seem to get it working any ideas?
things ive tried:
using http
{
source: '/websocket/',
destination: "http://localhost:8360" + "/websocket/",
}
using ws://
{
source: '/websocket/',
destination: "ws://localhost:8360" + "/websocket/",
}
any other ideas on how I can get websockets working for rewrites?
it may also be a good idea to note that yes, ive tested that other rewrites work just fine and that the websocket server works fine too
2 Replies
LilacOP
also this [issue](https://github.com/vercel/next.js/issues/23147) mentions the same commit stating that websockets are fixed