.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/
在使用nginx部署.net core mvc的程序時,假如我使用的是5002端口,并且當訪問站點時如果未登錄,則跳轉到登錄頁面。可是最后卻發現跳轉的時候端口丟失了,那是因為我配置的是
proxy_set_header Host $host;
替換為下面就好了
proxy_set_header Host $host:$server_port;
原文鏈接 :https://www.xiandanplay.com/