-
-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed querying ads over HTTPS #353
Conversation
changed http: to // to always use the correct protocol Fixes pi-hole#352
@@ -16,7 +16,7 @@ function eventsource() { | |||
} | |||
|
|||
var host = window.location.host; | |||
var source = new EventSource("http://"+host+"/admin/scripts/pi-hole/php/queryads.php?domain="+domain.val().toLowerCase()+"&"+exact); | |||
var source = new EventSource("//"+host+"/admin/scripts/pi-hole/php/queryads.php?domain="+domain.val().toLowerCase()+"&"+exact); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change it to
"admin/scripts/pi-hole/php/queryads.php?domain=..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change causes the block page to not work, as it tries to find the script at http://<some_ad_domain>/scripts/...
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
@@ -16,7 +16,7 @@ function eventsource() { | |||
} | |||
|
|||
var host = window.location.host; | |||
var source = new EventSource("http://"+host+"/admin/scripts/pi-hole/php/queryads.php?domain="+domain.val().toLowerCase()+"&"+exact); | |||
var source = new EventSource("scripts/pi-hole/php/queryads.php?domain="+domain.val().toLowerCase()+"&"+exact); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, simply add `admin/` to the front so it's `EventSource("admin/scripts/...`
Oh, I just edited my comment to ask you to instead change it to |
Hopefully it doesn't need any more changes now :P |
By submitting this pull request, I confirm the following (please check boxes, eg [X] - no spaces) Failure to fill the template will close your PR:
Please submit all pull requests against the
development
branch. Failure to do so will delay or deny your requestHow familiar are you with the codebase?:
1
changed http:// to // to always use the correct protocol
Fixes #352
This template was created based on the work of
udemy-dl
.