mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
Use CHAOS TXT local.api.txt instead of trying to parse pihole-FTL --config webserver.ports
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
6016131280
commit
96bf07863f
2 changed files with 47 additions and 49 deletions
|
@ -121,14 +121,14 @@ Main(){
|
|||
# or b) for the /search endpoint (webserver.api.searchAPIauth) no authentication is required.
|
||||
# Therefore, we try to query directly without authentication but do authenticat if 401 is returned
|
||||
|
||||
data=$(GetFTLData "/search/${domain}?N=${max_results}&partial=${partial}")
|
||||
data=$(GetFTLData "search/${domain}?N=${max_results}&partial=${partial}")
|
||||
|
||||
if [ "${data}" = 401 ]; then
|
||||
# Unauthenticated, so authenticate with the FTL server required
|
||||
Authenthication
|
||||
Authentication
|
||||
|
||||
# send query again
|
||||
data=$(GetFTLData "/search/${domain}?N=${max_results}&partial=${partial}")
|
||||
data=$(GetFTLData "search/${domain}?N=${max_results}&partial=${partial}")
|
||||
fi
|
||||
|
||||
GenerateOutput "${data}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue