I have a custom index.html in my Pi-Hole webserver / directory. When accessed from outside the local domain this now gives a 404 error. This is noted in the release summary at
The 404 status is accompanied by a custom "Oops! Page not found" banner that contains a link to the Dashboard.
My feeling is that this sort of possibly probing http request should not give any indication about what services may exist, so either 404 without a custom response page, or perhaps better 403 Forbidden would perhaps be more appropriate.
I agree :
In the past I also use to hide any information about my Apache configuration for all the 404-like pages and error pages and son on when I use to host stuff myself on the internet
This is intended. With webserver.serve_all = false, Pi-hole only serves the dashboard and the API, and until v6.8 / was the one path that ignored the setting. The 404 depends on the host name in the request, not on where it comes from: http://pi.hole/ (or whatever webserver.domain is set to) still redirects to the dashboard, while any other name or the bare IP gets the 404.
I don't see a security issue in the error page. It does reveal a Pi-hole, but so does every other path on that port, e.g., the login page under /admin/, and a bare 404 or a 403 would not hide that either. If the web interface should not be reachable from some networks, restrict it with webserver.acl or a firewall.
If you want your index.html back at /, set webserver.serve_all = true.