diff --git a/packages/http/src/http.js b/packages/http/src/http.js index 4be6ede..9867b32 100644 --- a/packages/http/src/http.js +++ b/packages/http/src/http.js @@ -68,7 +68,9 @@ export const createHttpServer = async (latus) => { res.statusCode = proxyRes.statusCode; if ('text/html; charset=UTF-8' === proxyRes.headers['content-type']) { requestMiddleware(req, res, () => { - res.setHeader('Content-Type', proxyRes.headers['content-type']); + if (!res.headersSent) { + res.setHeader('Content-Type', proxyRes.headers['content-type']); + } proxyRes.pipe(res); }); }