Replace YAML parser

This commit is contained in:
Zef Hemel
2023-11-29 16:51:28 +01:00
parent 62e98b1fd8
commit 1d5c6f9277
9 changed files with 55 additions and 12 deletions
+8 -1
View File
@@ -505,7 +505,6 @@ export class HttpServer {
return next();
}
}
console.log("Requested path to proxy", url, request.method);
if (url.startsWith("localhost")) {
url = `http://${url}`;
} else {
@@ -574,3 +573,11 @@ function utcDateString(mtime: number): string {
function authCookieName(host: string) {
return `auth:${host}`;
}
function headersToJson(headers: Headers) {
let headersObj: any = {};
for (const [key, value] of headers.entries()) {
headersObj[key] = value;
}
return JSON.stringify(headersObj);
}