Why does a redirect from a local IP address assume localhost?
- by Jeremy
I am developing a web application on my desktop and it is running on port 80. I am able to access the application from my laptop connected to the LAN by entering my desktop's LAN IP address 192.168.1.8. Now, my application sends a redirect after login, but my laptop assumes the final address is localhost/login. If I manually type in the IP address and URI for any page, it shows that I am logged in, so it works as expected. So, why does the redirect assume localhost?
Both of my machines are linux-based. The laptop being Chrome OS. I am running nginx which proxies non-static file requests to jetty on port 8080.