Skip to content

Conversation

mhei
Copy link
Contributor

@mhei mhei commented May 12, 2022

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.

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.

Signed-off-by: Michael Heimpold <[email protected]>
@csamsel
Copy link
Contributor

csamsel commented May 16, 2022

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

@goekay
Copy link
Member

goekay commented May 17, 2022

@mhei
Copy link
Contributor Author

mhei commented May 17, 2022

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 😄

@goekay goekay marked this pull request as ready for review September 17, 2025 14:41
@goekay
Copy link
Member

goekay commented Sep 17, 2025

@mhei if okay, i want to take over and finalize this. there are some things bugging me for years and i want to get rid of them :)

@goekay
Copy link
Member

goekay commented Sep 17, 2025

i decided after this many years that i do not care about multiple network configurations. it creates complexity in JettyServer.java (trying to infer all hosts, which is very hit and miss IMO). if someone has some advanced setup, that person should also be able to extract the necessary info without relying on what we render on the about page.

@goekay goekay merged commit 8abd09f into steve-community:master Sep 17, 2025
12 checks passed
goekay added a commit that referenced this pull request Sep 17, 2025
preparation came with #822
@mhei mhei deleted the webendpointinfo branch September 19, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants