samples: net: http_server: Create service binding to all addresses

Allow user to listen all IP addresses instead of hard coded one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-09-04 17:06:05 +03:00 committed by Mahesh Mahadevan
commit 5e7d730274

View file

@ -265,7 +265,7 @@ struct http_resource_detail_websocket ws_netstats_resource_detail = {
#if defined(CONFIG_NET_SAMPLE_HTTP_SERVICE)
static uint16_t test_http_service_port = CONFIG_NET_SAMPLE_HTTP_SERVER_SERVICE_PORT;
HTTP_SERVICE_DEFINE(test_http_service, CONFIG_NET_CONFIG_MY_IPV4_ADDR, &test_http_service_port, 1,
HTTP_SERVICE_DEFINE(test_http_service, NULL, &test_http_service_port, 1,
10, NULL);
HTTP_RESOURCE_DEFINE(index_html_gz_resource, test_http_service, "/",
@ -298,7 +298,7 @@ static const sec_tag_t sec_tag_list_verify_none[] = {
};
static uint16_t test_https_service_port = CONFIG_NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT;
HTTPS_SERVICE_DEFINE(test_https_service, CONFIG_NET_CONFIG_MY_IPV4_ADDR,
HTTPS_SERVICE_DEFINE(test_https_service, NULL,
&test_https_service_port, 1, 10, NULL,
sec_tag_list_verify_none, sizeof(sec_tag_list_verify_none));