fix: show actual bind address in Web UI log message#4897
Open
aliefe04 wants to merge 1 commit intoLizardByte:masterfrom
Open
fix: show actual bind address in Web UI log message#4897aliefe04 wants to merge 1 commit intoLizardByte:masterfrom
aliefe04 wants to merge 1 commit intoLizardByte:masterfrom
Conversation
When running multiple Sunshine instances with different bind_address values, the log message always showed 'localhost' instead of the actual IP address. This made it confusing to know which URL to use for each instance's Web UI. Now shows the configured bind_address when set, or 'localhost' as a fallback when binding to all interfaces (wildcard). Fixes LizardByte#4638
|
|
|
||
| // Store bind address for logging, use "localhost" as fallback for wildcard addresses | ||
| const auto bind_addr = server.config.address; | ||
| const auto display_addr = config::sunshine.bind_address.empty() ? "localhost"sv : std::string_view {bind_addr}; |
Member
There was a problem hiding this comment.
Could you check if the function mentioned in #4638 (comment) would return what we need?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
When running multiple Sunshine instances with different
bind_addressvalues, the log message always showedlocalhostinstead of the actual IP address. This made it confusing to know which URL to use for each instance's Web UI.This PR modifies the log message in
confighttp.cppto show the configuredbind_addresswhen set, and falls back tolocalhostwhen binding to all interfaces (wildcard address).Screenshot
Before:
After:
With
bind_address = 10.124.62.47:Without
bind_address(default):Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage