我有一个应用程序,用户可以在登录时访问其信息。如果他在未登录时尝试访问页面,则将其重定向到“登录”页面。在我尝试从我的外部ip而不是localhost访问该网站之前,此方法工作正常。
正常情况:网址
http://localhost:50221/UserDashboard/LoggedIn
重定向到
http://localhost:50221/Account/LogIn
如果我尝试通过以下方式访问网站:
http://192.168.0.220:3000/UserDashboard/LoggedIn
(我正在使用iis-proxy https://github.com/icflorescu/iisexpress-proxy)
我被重定向到
http://localhost:50221/Account/LogIn
代替
http://192.168.0.220:3000/Account/LogIn
有什么方法可以配置Response.Redirect以使用ghiven基本域,同时仍使用相对路径?