Skip to content
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

Merged
merged 5 commits into from
Jan 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/queryads.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Member

@DL6ER DL6ER Jan 12, 2017

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=..."

Copy link
Contributor

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.


// Reset and show field
ta.empty();
Expand Down