1. 复现错误
在搭建vue-cli环境,用nginx做代理服务器,访问时却显示:Invalid Host header。
2. 分析错误
知其然,知其所以然,我们在解决该问题之前,要弄明白Invalid Host header是什么。
ChatGPT目前正火,可以借助ChatGPT来回答,Invalid Host header是什么,如下图所示:
The “Invalid Host header” error typically o***urs in web applications when a request is made to a server with an incorrect or unexpected host header value.