Improved API auth failure error

message
This commit is contained in:
Pierre 2017-06-13 11:02:39 +02:00
parent 4bbe967e2e
commit 040750d11c

View File

@ -42,7 +42,7 @@ if(defined("APIServiceDomain")){
//Then check for referer //Then check for referer
if(!isset($_SERVER["HTTP_REFERER"])) if(!isset($_SERVER["HTTP_REFERER"]))
Rest_fatal_error(401, "Access from direct requests denied !"); Rest_fatal_error(401, "Access from direct requests denied with this client token !");
//Check the referer //Check the referer
if(get_url_domain($_SERVER["HTTP_REFERER"]) !== APIServiceDomain) if(get_url_domain($_SERVER["HTTP_REFERER"]) !== APIServiceDomain)