Skip to content
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

problems using 0.0.0.0 as serve address #18

Open
simobgl opened this issue Jun 13, 2021 · 5 comments
Open

problems using 0.0.0.0 as serve address #18

simobgl opened this issue Jun 13, 2021 · 5 comments

Comments

@simobgl
Copy link

simobgl commented Jun 13, 2021

Trying to expose the stats on all interfaces the same value is used building the page, and the browsers will then interpret 0.0.0.0 as localhost

@chenjiandongx
Copy link
Member

@joegalaxy71 what is your expected result?

@simobgl
Copy link
Author

simobgl commented Jun 17, 2021

It should bind to 0.0.0.0 on the server, autodiscover a valid public IP and use that address to render the HTML, allowing statsview to be reachable from outside. Thank you for your work, it's a nice package.

@chenjiandongx
Copy link
Member

Statsview provide a viewer.WithLinkAddr() method to set the request address to render the HTML hence you could put your public IP here

@chaokw
Copy link

chaokw commented Sep 15, 2021

it could be reachable from outside by setting address as below:
viewer.SetConfiguration(viewer.WithAddr(":12345"), viewer.WithLinkAddr("11.82.205.147:12345"))

@KubeStacker
Copy link

KubeStacker commented Jul 1, 2022

It would be hard to use in a cloud native golang app(because IP is not fixed, the container IP or service IP is always random).
@chenjiandongx has any idea?

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

No branches or pull requests

4 participants