forked from cory/tildefriends
Refresh the JWT on websocket connect.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3993 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -246,7 +246,7 @@ function handleWebSocketRequest(request, response, client) {
|
||||
}
|
||||
response.onMessage = null;
|
||||
|
||||
handler.invoke(request, response);
|
||||
let extra_headers = handler.invoke(request, response);
|
||||
|
||||
client.read(function(data) {
|
||||
if (data) {
|
||||
@ -333,7 +333,7 @@ function handleWebSocketRequest(request, response, client) {
|
||||
if (request.headers["sec-websocket-version"] != "13") {
|
||||
headers["Sec-WebSocket-Version"] = "13";
|
||||
}
|
||||
response.writeHead(101, headers);
|
||||
response.writeHead(101, Object.assign({}, headers, extra_headers));
|
||||
}
|
||||
|
||||
function webSocketAcceptResponse(key) {
|
||||
|
Reference in New Issue
Block a user