1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Set res.statusCode before flushing headers (#3353)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-07-12 17:07:54 +03:00 committed by GitHub
parent f86360d641
commit 50ec37f158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,7 +168,10 @@ export class LensProxy extends Singleton {
if (!res.headersSent && req.url) { if (!res.headersSent && req.url) {
const url = new URL(req.url, "http://localhost"); const url = new URL(req.url, "http://localhost");
if (url.searchParams.has("watch")) res.flushHeaders(); if (url.searchParams.has("watch")) {
res.statusCode = proxyRes.statusCode;
res.flushHeaders();
}
} }
}); });