Access control origin fix

This commit is contained in:
Pierre 2017-07-01 10:41:46 +02:00
parent a82b65f18d
commit 71e3d06209

View File

@ -41,7 +41,7 @@ if(!$cs->tokens->checkClientRequestTokens())
if(defined("APIServiceDomain")){ if(defined("APIServiceDomain")){
//First, limit requests //First, limit requests
header("Access-Control-Allow-Origin: ".APIServiceDomain); header("Access-Control-Allow-Origin: http://".APIServiceDomain.", https://".APIServiceDomain);
//Then check for referer //Then check for referer
if(!isset($_SERVER["HTTP_REFERER"])) if(!isset($_SERVER["HTTP_REFERER"]))