fix websockets

This commit is contained in:
Toshit Chawda 2024-01-15 12:50:00 -08:00
parent 4081ea6cce
commit 2c54b54b4f
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 30 additions and 11 deletions

View file

@ -51,15 +51,9 @@ impl EpxWebSocket {
let key = STANDARD.encode(rand);
let pathstr = if let Some(p) = url.path_and_query() {
p.to_string()
} else {
url.path().to_string()
};
let mut builder = Request::builder()
.method("GET")
.uri(pathstr)
.uri(url.clone())
.header("Host", host)
.header("Origin", origin)
.header(UPGRADE, "websocket")