在 Linux 上运行 .NET 网站,发现 RedirectToAction 跳转到 127.0.0.1:443
.NET 项目发布到 Linux / CentOS / nginx 上,调用 RedirectToAction 方法跳转到 127.0.0.1:443,而不是正在访问的域名,怎么办?
打开该网站的 nginx 配置文件,找到反射代理配置(proxy_pass),将:
proxy_set_header Host 127.0.0.1:$server_port;
改为
proxy_set_header Host $host;
可能相关的内容