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:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vdc_chat_display.php
|
||||
#
|
||||
# Copyright (C) 2020 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2021 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This is the interface for agents to chat with customers and each other. It's separate from the manager-to-agent
|
||||
# chat interface out of necessity and calls the chat_db_query.php page to send information and display it. It will
|
||||
@@ -19,11 +19,14 @@
|
||||
# 170528-1001 - Added variable filtering
|
||||
# 190902-0914 - Fix for PHP 7.2
|
||||
# 201117-2207 - Changes for better compatibility with non-latin data input
|
||||
# 210616-2040 - Added optional CORS support, see options.php for details
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
$php_script = 'vdc_chat_display.php';
|
||||
|
||||
$MT[0]='';
|
||||
$chat_group_ids=$MT;
|
||||
|
||||
@@ -86,6 +89,13 @@ $VUselected_language = $SSdefault_language;
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
# 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");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header ("Pragma: no-cache"); // HTTP/1.0
|
||||
|
||||
Reference in New Issue
Block a user