steve
steve copied to clipboard
Generate endpoint info on About page based on provided HTTP host header
Showing all the interface addresses we're listening on is not helpful on the About page. However, we serve the About page, we already know that we are reaching the server using the given hostname in the corresponding HTTP header, so let's use it to construct the URLs.
This takes also into account that the request/access already passed proxy server(s), uses DNS CNAMEs etc.
Warning: Since I'm not a Java developer, I marked this PR as draft. I'm also unhappy about some code duplications I introduce here. The primary goal is to show your my understanding on how things should work in my eyes and to start a discussing about it.
It is typical that charging stations are on a different network then the users browser (charging station on a M2M/VPN connection, browser on internet), thats why we show all interfaces
correct, that's why we have https://github.com/RWTH-i5-IDSG/steve/wiki/Configuration#multiple-interfaces
I fully understand your points. However, in my setup, SteVe is listening on localhost only and proxied by an Apache server - no M2M/VPN tunnel involved. In such a setup, only the localhost interface is listed in the About page which is more confusing than useful. Maybe an idea would be to just add the HTTP host header based addresses to the existing list? Edit: I'll try to cast my idea into code so that we can discuss better. Please be patient :smile: