mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 02:16:16 +00:00
Replaced 0.0.0.0 with 127.0.0.1
if you want to use 0.0.0.0 use the host argument when starting the server
This commit is contained in:
parent
9315be7461
commit
c403ee720f
|
@ -47,7 +47,7 @@ if __name__ == '__main__':
|
|||
portable = path.join(path.dirname(path.realpath(__file__)), 'config')
|
||||
else:
|
||||
portable = None
|
||||
t = Thread(target=run_server, args=(port, "0.0.0.0", portable))
|
||||
t = Thread(target=run_server, args=(port, url, portable))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
|
10
server.py
10
server.py
|
@ -270,13 +270,9 @@ def openDownloadsFolder():
|
|||
elif sys.platform == 'win32':
|
||||
subprocess.check_call(['explorer', folder])
|
||||
|
||||
def run_server(port, host="0.0.0.0", portable=None):
|
||||
def run_server(port, host="127.0.0.1", portable=None):
|
||||
app.initialize(portable)
|
||||
if host == "0.0.0.0":
|
||||
displayHost = "127.0.0.1"
|
||||
else:
|
||||
displayHost = host
|
||||
print("Starting server at http://" + displayHost + ":" + str(port))
|
||||
print("Starting server at http://" + host + ":" + str(port))
|
||||
socketio.run(server, host=host, port=port)
|
||||
|
||||
|
||||
|
@ -294,5 +290,5 @@ if __name__ == '__main__':
|
|||
if '--host' in sys.argv:
|
||||
host = str(sys.argv[sys.argv.index("--host")+1])
|
||||
else:
|
||||
host = "0.0.0.0"
|
||||
host = "127.0.0.1"
|
||||
run_server(port, host, portable)
|
||||
|
|
Loading…
Reference in a new issue