当后台路由跳转到前端返回到页面时,会遇到下载页面文件的情况。
在这里输入图像描述
单击在这里输入图像描述时,浏览器将自动下载post.html。
发布于 2021-12-11 03:45:34
尝试使用res.send或简单的res.sendFile代替。
res.send
res.sendFile
https://expressjs.com/en/api.html#res.send
https://stackoverflow.com/questions/70312434
相似问题