diff --git a/src/webserver/webserver.c b/src/webserver/webserver.c index 101ae7182..18c5b78e1 100644 --- a/src/webserver/webserver.c +++ b/src/webserver/webserver.c @@ -281,7 +281,7 @@ unsigned short get_api_string(char **buf, const bool domain) size_t len = 0; // First byte has the length of the first string **buf = 0; - const char *domain_str = domain ? config.webserver.domain.v.s : "localhost"; + const char *domain_str = domain ? config.webserver.domain.v.s : "pi.hole"; size_t api_str_size = strlen(domain_str) + 20; // Check if the string is too long for the TXT record diff --git a/test/test_suite.bats b/test/test_suite.bats index fbba82d60..1891abde8 100644 --- a/test/test_suite.bats +++ b/test/test_suite.bats @@ -1179,7 +1179,7 @@ @test "API addresses reported correctly by CHAOS TXT local.api.ftl" { run bash -c 'dig CHAOS TXT local.api.ftl +short @127.0.0.1' printf "dig (full): %s\n" "${lines[@]}" - [[ ${lines[0]} == '"http://localhost:80/api/" "https://localhost:443/api/"' ]] + [[ ${lines[0]} == '"http://pi.hole:80/api/" "https://pi.hole:443/api/"' ]] } @test "API addresses reported by CHAOS TXT api.ftl identical to domain.api.ftl" {