-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print the server's scheme when logging that it's reachable #585
base: main
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.