robinp7720 / Blue-Stats-Minecraft

Ever wanted a stat interface for truly everything?
http://stats.mysunland.org/
Apache License 2.0
33 stars 14 forks source link

Https compatiblity #106

Closed Darkilen closed 5 years ago

Darkilen commented 5 years ago

Hello, allPlayers module is not https friendly (related #100), can you fix it please ?

You have hard coded "http" on this file : classes/url.class.php

robinp7720 commented 5 years ago

Those are default config options, not hard coded values. You can change these in the BlueStats admin panel. The most likely reason for the error with #100 is that the browser blocked the non-https request. If the urls would be properly configured within the admin panel with the correct protocol, such an error would not occur.

Darkilen commented 5 years ago

I'm ok with you, but you can use the protocol http or https automatically by setting "//" instead of "http://" or "https://" by default and just ask for the URI in admin panel Example for this line classes/url.class.php: $this->config->setDefault("ajax-base-url", "//$_SERVER[HTTP_HOST]/ajax/");)

If a user has enable https on his website, he load the page with https://example.com and all request are automatically load with https (including ajax)