http: add --http-listen=<ip4>, and listen by default on 127.0.0.1 (#81)

Co-authored-by: AndrolGenhald <AndrolGenhald@gmail.com>
This commit is contained in:
Kamil Trzciński
2023-07-01 16:38:36 +02:00
committed by GitHub
parent f1966ab2b9
commit 8d0c04ccd5
12 changed files with 37 additions and 6 deletions

View File

@ -46,6 +46,7 @@ camera_options_t camera_options = {
};
http_server_options_t http_options = {
.listen = "127.0.0.1",
.port = 8080,
.maxcons = 10
};
@ -126,6 +127,7 @@ option_t all_options[] = {
DEFINE_OPTION_DEFAULT(camera, list_options, bool, "1", "List all available options and exit."),
DEFINE_OPTION_PTR(http, listen, string, "Set the IP address the HTTP web-server will bind to. Set to 0.0.0.0 to listen on all interfaces."),
DEFINE_OPTION(http, port, uint, "Set the HTTP web-server port."),
DEFINE_OPTION(http, maxcons, uint, "Set maximum number of concurrent HTTP connections."),