Skip to content

Commit e27d5cd

Browse files
committed
Prevent registry proxy from trying to send responses twice
1 parent e64cd5e commit e27d5cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/webapp/app/v3/registryProxy.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ export class RegistryProxy {
281281

282282
proxyReq.on("error", (error) => {
283283
logger.error("Error proxying request", { error: error.message });
284+
285+
if (response.headersSent) {
286+
return;
287+
}
288+
284289
response.writeHead(500, { "Content-Type": "text/plain" });
285290
response.end(`Internal Server Error: ${error.message}`);
286291
});

0 commit comments

Comments
 (0)