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
Added IP address bind to HTTP frontend listener #5014
Conversation
lib/extension/frontend.js
Outdated
@@ -27,6 +27,7 @@ class Frontend extends Extension { | |||
this.server.on('upgrade', this.onUpgrade); | |||
this.developmentServer = settings.get().frontend.development_server; | |||
this.development = !!this.developmentServer; | |||
this.ipAddress = settings.get().frontend.ip || '0.0.0.0'; |
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.
Please change ip
to host
, the rest looks good.
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.
Got it. What about documentation? Do i need fork document repo and make changes?
Some questions. What about default settings in settings.js file. Should i add frontend section to it? And what default settings you expect? |
Add defaults here: zigbee2mqtt/lib/util/settings.js Line 11 in 6b32f30
IIRC default host is 0.0.0.0 and port is 8080 |
@nurikk I'm already trying this. But... Default behavior for current version: frontend not enabled. If in current pull request i will add this settings, at first all tests fails, because in tests frontend server not release port. Also attach interface to 0.0.0.0 with default behavior is not secure, so i did this pull request. Line 71 in 6b32f30
If i add defaults, this condition will be always true |
I see, then please add the defaults back into |
81188ca
to
95e7af3
Compare
Thanks, also updated the docs. |
Allow attach frontend to specific IP address or interface