Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit 106617a

Browse files
authored
Merge pull request #155 from aaknitt/patch-2
Add keyword arg to let Bottle listen on all interfaces
2 parents 2ae5a80 + d249b51 commit 106617a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

eel/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'geometry': {}, # Dictionary of size/position for all windows
3939
'close_callback': None, # Callback for when all windows have closed
4040
'app_mode': True, # (Chrome specific option)
41+
'all_interfaces': False, # Allow bottle server to listen for connections on all interfaces
4142
}
4243

4344
# == Temporary (suppressable) error message to inform users of breaking API change for v1.0.0 ===
@@ -130,8 +131,12 @@ def start(*start_urls, **kwargs):
130131
show(*start_urls)
131132

132133
def run_lambda():
134+
if _start_args['all_interfaces'] == True:
135+
HOST = '0.0.0.0'
136+
else:
137+
HOST = _start_args['host']
133138
return btl.run(
134-
host=_start_args['host'],
139+
host=HOST,
135140
port=_start_args['port'],
136141
server=wbs.GeventWebSocketServer,
137142
quiet=True)

0 commit comments

Comments
 (0)