From 5c889cd0c6883fa99ce0c3bb0ca464a55868813f Mon Sep 17 00:00:00 2001 From: ranlo Date: Tue, 28 Sep 2021 12:42:55 +0300 Subject: [PATCH 1/3] Update config.yaml --- config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yaml b/config.yaml index 2c87b8d..18b1bbb 100644 --- a/config.yaml +++ b/config.yaml @@ -52,6 +52,7 @@ frontend: user_lang: userlang update: updateoption choose_net: false + http_port: 80 # NETWORK - # Some elements related to the network configuration, such as From c745f3ce34c76d54ab01ce7541b39b90150b63cf Mon Sep 17 00:00:00 2001 From: ranlo Date: Tue, 28 Sep 2021 12:49:52 +0300 Subject: [PATCH 2/3] Update main.py - configurable listen port support configuration for listen port. Default to 80 if no configuration --- server/frontend/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/frontend/main.py b/server/frontend/main.py index 76d2240..c95fe7e 100644 --- a/server/frontend/main.py +++ b/server/frontend/main.py @@ -46,7 +46,13 @@ app.register_blueprint(misc_bp, url_prefix='/api/misc') app.register_blueprint(update_bp, url_prefix='/api/update') if __name__ == '__main__': + port = "" + try: + port = int(read_config(("frontend", "http_port"))) + except: + port = 80 + print(port) if read_config(("frontend", "remote_access")): - app.run(host="0.0.0.0", port=80) + app.run(host="0.0.0.0", port=port) else: - app.run(port=80) + app.run(port=port) From 8da2a72df5253cee6e8babf6006aadea57125a36 Mon Sep 17 00:00:00 2001 From: ranlo Date: Tue, 28 Sep 2021 12:52:54 +0300 Subject: [PATCH 3/3] Update main.py --- server/frontend/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/server/frontend/main.py b/server/frontend/main.py index c95fe7e..d9a3c5d 100644 --- a/server/frontend/main.py +++ b/server/frontend/main.py @@ -51,7 +51,6 @@ if __name__ == '__main__': port = int(read_config(("frontend", "http_port"))) except: port = 80 - print(port) if read_config(("frontend", "remote_access")): app.run(host="0.0.0.0", port=port) else: