reverting flushHeaders() fix to restore auto-refresh (#5283)

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann authored and GitHub committed 2022-04-27 11:56:07 -04:00
1 parent ff119dabf7
commit 51a93b8cc0
1 file changed
-9
-9
View File
@@ -173,15 +173,6 @@ export class LensProxy extends Singleton {
this.retryCounters.delete(retryCounterId);
}
if (!res.headersSent && req.url) {
const url = new URL(req.url, "http://localhost");
if (url.searchParams.has("watch")) {
res.statusCode = proxyRes.statusCode;
res.flushHeaders();
}
}
proxyRes.on("aborted", () => { // happens when proxy target aborts connection
res.end();
});