Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
fix: try and fix malformed http res but to no avail http-party/node-h…
Browse files Browse the repository at this point in the history
  • Loading branch information
uhidontkno committed Apr 26, 2024
1 parent d9575f9 commit 5ea1c07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ if (process.argv.includes("--unavailale") || process.argv.includes("-u")) {
"/" +
req.url.replace(`/ws/${req.url.split("/")[2]}/`, "");
req.url = url;
try {
proxy.ws(req, socket, head, { target: req.url });
} catch {}
} else {
socket.send("no");
}
Expand Down
1 change: 0 additions & 1 deletion server/modules/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ async function ping(url: string): Promise<string> {
let headers: { [key: string]: string } = {};
headers.Authorization = getHTTPAuthHeader(url);
const response = await fetch("http://" + url.split("@")[1] + "/", {
verbose: true,
headers: {
Authorization: getHTTPAuthHeader(url),
"Content-Type": "text/plain",
Expand Down

0 comments on commit 5ea1c07

Please sign in to comment.