better connection counting
Build and Push Docker Images / build-and-push (push) Successful in 23s

This commit is contained in:
Bram committed 2026-11-04 11:20:20 +01:00
1 parent 608164dfdd
commit a4b85162ab
6 files changed
+127 -19

No files matched your search

+3 -2
View File
@@ -6,7 +6,7 @@ const {
probeCycle,
startProbing,
stopProbing,
} = require('./src/upstreams');
} = require('./src/upstream-pool');
const { handleProxy } = require('./src/proxy');
const { healthPayload } = require('./src/health');
const { sendText, sendJson } = require('./src/http-utils');
@@ -16,7 +16,8 @@ const HEALTH_PATHS = new Set(['/health', '/healthz']);
const server = http.createServer((req, res) => {
let reqUrl;
try {
reqUrl = new URL(req.url, 'http://proxy.invalid');
const rawUrl = req.url.replace(/^\/+/, '/');
reqUrl = new URL(rawUrl, 'http://proxy.invalid');
} catch {
sendText(res, 400, 'Bad request');
return;