修复websocket跨域问题

This commit is contained in:
xiongziliang 2019-09-17 10:29:15 +08:00
parent ca0fc13367
commit 10e74b7eb6

View File

@ -202,7 +202,7 @@ bool HttpSession::checkWebSocket(){
}
auto Sec_WebSocket_Accept = encodeBase64(SHA1::encode_bin(Sec_WebSocket_Key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"));
KeyValue headerOut;
KeyValue headerOut = makeHttpHeader();
headerOut["Upgrade"] = "websocket";
headerOut["Connection"] = "Upgrade";
headerOut["Sec-WebSocket-Accept"] = Sec_WebSocket_Accept;