Print the server's scheme when logging that it's reachable#585
Print the server's scheme when logging that it's reachable#585
Conversation
|
Not sure if we can make this change - but I think it would be nice to log the scheme as described in #578. We can also assume HTTP (not HTTPS) here, but I'd prefer logging it correctly. |
|
We can also consider detecting if the IP is |
adam-fowler
left a comment
There was a problem hiding this comment.
Seems a bit of overkill just to print http or https.
Could you not just check the first channel handler is NIOSSLServerHandler
|
Unfortunately no, as TransportServices does not have a handler, and these handlers are only applicable for child channels of the server |
d30cdd4 to
c2e3da3
Compare
adam-fowler
left a comment
There was a problem hiding this comment.
I'm not sure what the point of this is? Why do you want to print 127.0.0.1 when the bind address is 0.0.0.0
|
@adam-fowler my idea was that I want to (eventually) make it explicit how to reach it from various devices. Should've explained that in the PR. So |
|
@Joannis But bind address 0.0.0.0 is different from 127.0.0.1, ie one accepts connections from any address while the other accepts only connections from the localhost. We shouldn't be pretending they are the same. Maybe if the bind address is set to 0.0.0.0 then we can add an additional log that says it is accepting connections from anywhere |
|
I understand what |
|
An excellent example that I've had people ask time and time again:
|
|
You need an additional log item then, because the people who do know what is going on are going to be a little confused when there server logs says the server is listening on 127.0.0.1 but accepting connections from anywhere.
Also can we make it clear which situation we are trying to fix here, as your change doesn't fix this. |
No description provided.