Closed miszterx closed 3 years ago
What happens if you run the same request on cURL?
Hi, With curl it woks fine:
{"status":"enabled"}
{"domains_being_blocked":337448,"dns_queries_today":10389,"ads_blocked_today":1817,"ads_percentage_today":17.489653,"unique_domains":2254,"queries_forwarded":7110,"queries_cached":1462,"clients_ever_seen":9,"unique_clients":9,"dns_queries_all_types":10389,"reply_NODATA":132,"reply_NXDOMAIN":111,"reply_CNAME":975,"reply_IP":1976,"privacy_level":0,"status":"enabled","gravity_last_updated":{"file_exists":true,"absolute":1598753399,"relative":{"days":2,"hours":7,"minutes":11}}}%
But if the Pi Stats try the same:
I can get 400
Any idea?
@miszterx if you don't mind can you post a screenshot of the Pi Stats preferences window?
I'm interested in how you configured the URL, is it https://pihole.xorp.hu
?
Sure. Here it is:
I needed to add the port for https. Without the port it wanted to go on port 80 by default. With :443 it goes to the proper HTTPS site definition, but with the result what I reported above.
It seems the issue is when the app tries to access an external URL with HTTPS. I'm going to add a flag when setting up the pi-hole asking the user if it's http or https, that the app will know what to do.
Perfect! Thanks. I am glad that you could reproduce it. Looking forward to test the new version.
@miszterx I've added an option for you to configure your pi-hole as either HTTP or HTTPS.
I'm attaching the beta version here, if you can give it a try I'd appreciate :)
Works fine! Thanks!
Hi, I have the latest 2.2.0 Pi-Stats on MacOs. On the server side I have: Pi-hole v5.1.2 Web Interface v5.1.1 FTL v5.2.
I get the API Token. Took in the necessary field in the Pi-Stats and I just got red icon. On the server side I have checked the nginx log and I can see:
I can see just HTTP code 400. Can you help me with this? Thanks!