forked from science-ation/science-ation
Add a hidden config option (put it in data/config.inc.php) to not require API access over SSL
This commit is contained in:
parent
8f17e80169
commit
459eb17e98
2
api.php
2
api.php
@ -27,7 +27,7 @@ require_once("common.inc.functions.php");
|
||||
require_once("account.inc.php");
|
||||
require_once("user.inc.php");
|
||||
require_once("schedule.inc.php");
|
||||
if($_SERVER['HTTPS']!="on") {
|
||||
if($_SERVER['HTTPS']!="on" && !$API_DONT_REQUIRE_SSL) {
|
||||
$ret['status']="error";
|
||||
$ret['error']="SSL is required for API access, please access the API over https";
|
||||
echo json_encode($ret);
|
||||
|
Loading…
Reference in New Issue
Block a user