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:
parent
f86360d641
commit
50ec37f158
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user