.net core mvc 跳转LoginPath时端口缺失

     在使用nginx部署.net core mvc的程序时,假如我使用的是5002端口,并且当访问站点时如果未登录,则跳转到登录页面。可是最后却发现跳转的时候端口丢失了,那是因为我配置的是

      proxy_set_header Host $host;

     替换为下面就好了

     proxy_set_header Host $host:$server_port;

    

 

 

   原文链接 :https://www.xiandanplay.com/

 

  

posted @ 2024-08-17 17:33  灬丶  阅读(15)  评论(0编辑  收藏  举报