mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
flush response header always when proxy gets a response
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
f18d8618cd
commit
88937ecc8e
@ -120,12 +120,16 @@ export class LensProxy {
|
||||
protected createProxy(): httpProxy {
|
||||
const proxy = httpProxy.createProxyServer();
|
||||
|
||||
proxy.on("proxyRes", (proxyRes, req) => {
|
||||
proxy.on("proxyRes", (proxyRes, req, res) => {
|
||||
const retryCounterId = this.getRequestId(req);
|
||||
|
||||
if (this.retryCounters.has(retryCounterId)) {
|
||||
this.retryCounters.delete(retryCounterId);
|
||||
}
|
||||
|
||||
if (!res.headersSent) {
|
||||
res.flushHeaders();
|
||||
}
|
||||
});
|
||||
|
||||
proxy.on("error", (error, req, res, target) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user