Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Disable HTTPS & shift functions to block page #1420
By submitting this pull request, I confirm the following:
How familiar are you with the codebase?:
The changes here primarily shift the work of header functions, JS redirects, etc, to the block page as per #1416.
Also, by commenting out
A blocked HTTPS query will be instantly dropped, but may provide an error message similar to:
If you have HTTPS enabled on your install (in my case, with Let's Encrypt), you'll see the following when you check the headers of a blocked HTTPS site (it's working as expected):
This is an example of it not working, when the HTTPS enabled is attempting to serve the wrong certificate to a blocked domain:
I get this (and doubleclick is def blocked)
I have tested this type of "breaking" the https request and the results are great with respect to page-load times. Those curl HTTPS error codes are similar to the ones I got after I configured nginx and it was flying. I may have screenshots of browser dev-tools page load times before and after. If it can be done with lighttpd, then all the better.
The following curl fetch times were taken with a regular pi-hole and the a pi-hole with nginx configured to give the same https error (35) as above.
Fail to connect (for https):
Protocol error (for https):
The https response times are halved. It does cut a 5-6 second page load time to 2-3 seconds from what I have seen, considering that there are so few http content. Sorry I'm using nginx - i didn't know how to configure lighttpd for the same result.
Regular pi-hole (fail to connect)
Pihole/nginx (error 35)