Skip to content

Commit

Permalink
Change default value of webserver.port to comply with auto-generated …
Browse files Browse the repository at this point in the history
…config string

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Feb 20, 2025
1 parent 84096f4 commit 996fae9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ static void initConfig(struct config *conf)
conf->webserver.port.a = cJSON_CreateStringReference("comma-separated list of <[ip_address:]port>");
conf->webserver.port.f = FLAG_RESTART_FTL;
conf->webserver.port.t = CONF_STRING;
conf->webserver.port.d.s = (char*)"80o,[::]:80o,443so,[::]:443so";
conf->webserver.port.d.s = (char*)"80o,443os,[::]:80o,[::]:443os";
conf->webserver.port.c = validate_stub; // Type-based checking + civetweb syntax checking

conf->webserver.threads.k = "webserver.threads";
Expand Down
2 changes: 1 addition & 1 deletion test/pihole.toml
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
#
# Possible values are:
# comma-separated list of <[ip_address:]port>
port = "80o,[::]:80o,443so,[::]:443so"
port = "80o,443os,[::]:80o,[::]:443os"

# Maximum number of worker threads allowed.
# The Pi-hole web server handles each incoming connection in a separate thread.
Expand Down
2 changes: 1 addition & 1 deletion test/test_suite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@
[[ "${lines[0]}" == "[ 1.1.1.1 abc-custom.com def-custom.de, 2.2.2.2 äste.com steä.com ]" ]]
run bash -c './pihole-FTL --config webserver.port'
printf "%s\n" "${lines[@]}"
[[ "${lines[0]}" == "80o,[::]:80o,443so,[::]:443so" ]]
[[ "${lines[0]}" == "80o,443os,[::]:80o,[::]:443os" ]]
}

@test "Create, verify and re-import Teleporter file via CLI" {
Expand Down

0 comments on commit 996fae9

Please sign in to comment.