Added CORS(Cross-Origin Resource Sharing) support for the VICIdial agent PHP scripts. see the CORS_SUPPORT.txt doc for more information.

git-svn-id: svn://192.168.202.10@3459 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-06-18 03:24:05 +00:00
parent 062d318dc0
commit e2e0505570
35 changed files with 491 additions and 72 deletions
+11 -2
View File
@@ -22,11 +22,11 @@
# 150724-1657 - First Build
# 170526-2305 - Added additional variable filtering
# 210615-1039 - Default security fixes, CVE-2021-28854
# 210616-2049 - Added optional CORS support, see options.php for details
#
$api_script = 'add_FPG';
header ("Content-type: text/html; charset=utf-8");
$php_script = 'dispo_add_FPG.php';
require_once("dbconnect_mysqli.php");
require_once("functions.php");
@@ -75,6 +75,15 @@ $phone_number = preg_replace('/[^-_0-9a-zA-Z]/','',$phone_number);
$FPG_id = preg_replace("/\'|\"|\\\\|;| /","",$FPG_id);
$lead_id = preg_replace('/[^0-9]/','',$lead_id);
# if options file exists, use the override values for the above variables
# see the options-example.php file for more information
if (file_exists('options.php'))
{
require_once('options.php');
}
header ("Content-type: text/html; charset=utf-8");
#############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
$VUselected_language = '';