We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would really like to switch from Baojs to Elysia, but i need the websocket headers to authenticate the messages
On Elysia i cant get them: Elysia-log:
"raw": ServerWebSocket { "binaryType": "uint8array", "close": [Function: close], "cork": [Function: cork], "data": { "request": Request (0 KB) { method: "GET", url: "http://localhost:3005/search/proxy_search_wsp/1" }, "store": {}, "set": { "headers": {}, "status": 200 }, "publish": { "name": "publish" }, "query": -1, "params": { "wsp": "1" }, "id": 1684826648522, "message": undefined, "transformMessage": [] }, "getBufferedAmount": [Function: getBufferedAmount], "isSubscribed": [Function: isSubscribed], "publish": [Function: publish], "publishBinary": [Function: publishBinary], "publishText": [Function: publishText], "readyState": 1, "remoteAddress": "127.0.0.1", "send": [Function: send], "sendBinary": [Function: sendBinary], "sendText": [Function: sendText], "subscribe": [Function: subscribe], "unsubscribe": [Function: unsubscribe] }, "data": { "request": Request (0 KB) { method: "GET", url: "http://localhost:3005/search/proxy_search_wsp/1" }, "store": {}, "set": { "headers": {}, "status": 200 }, "publish": { "name": "publish" }, "query": -1, "params": { "wsp": "1" }, "id": 1684826648522, "message": undefined, "transformMessage": [] }, "isSubscribed": [Function: isSubscribed], "publish": [Function: publish], "publishToSelf": [Function: publishToSelf], "send": [Function: send], "subscribe": [Function: subscribe], "unsubscribe": [Function: unsubscribe], "cork": [Function: cork], "close": [Function: close] } { "term": "tt" }
Would appreciate help!
The text was updated successfully, but these errors were encountered:
Should be fixed with 1d0c00a, update to Elysia 0.5.3 to see if this solve your problem.
To verify, this snippet should log a request's headers:
import { Elysia, ws } from 'elysia' const app = new Elysia() .use(ws()) .ws('/', { message(ws, message) { console.log(ws.data.headers) ws.send(message) } }) .listen(3000)
Sorry, something went wrong.
Thank you worked perfectly!
No branches or pull requests
I would really like to switch from Baojs to Elysia, but i need the websocket headers to authenticate the messages
On Elysia i cant get them:
Elysia-log:
Would appreciate help!
The text was updated successfully, but these errors were encountered: