fix: proxy status code
This commit is contained in:
parent
a2c5c21c44
commit
768098b513
|
@ -60,6 +60,7 @@ export const createHttpServer = async (latus) => {
|
|||
target: `http://127.0.0.1:${devPort}`,
|
||||
});
|
||||
proxy.on('proxyRes', async (proxyRes, req, res) => {
|
||||
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']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user