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

Fixed querying ads over HTTPS #353

merged 5 commits into from
Jan 14, 2017

Conversation

C0rn3j
Copy link
Contributor

@C0rn3j C0rn3j commented Jan 12, 2017

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 request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How 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.

changed http: to // to always use the correct protocol

Fixes pi-hole#352
@CLAassistant
Copy link

CLAassistant commented Jan 12, 2017

CLA assistant check
All committers have signed the CLA.

@@ -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.

small edit
@@ -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);
Copy link
Contributor

@AzureMarker AzureMarker Jan 13, 2017

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/...`

@AzureMarker
Copy link
Contributor

Oh, I just edited my comment to ask you to instead change it to "admin/scripts/..., sorry!

@C0rn3j
Copy link
Contributor Author

C0rn3j commented Jan 13, 2017

Hopefully it doesn't need any more changes now :P

@DL6ER DL6ER merged commit 192d01f into pi-hole:devel Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants