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
|
||||
# options.php - manually defined options for vicidial.php
|
||||
#
|
||||
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# rename this file to options.php for the settings here to go into effect
|
||||
#
|
||||
@@ -19,6 +19,7 @@
|
||||
# 191107-0925 - Added $webphone_call_seconds
|
||||
# 200515-1339 - Added ast13_volume_override option
|
||||
# 200827-1230 - Added alt_display_enabled option
|
||||
# 210616-0959 - Added CORS support
|
||||
#
|
||||
|
||||
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
|
||||
@@ -78,17 +79,33 @@ $SIDEBAR_COLOR = '#F6F6F6';
|
||||
$window_validation = 0; # set to 1 to disallow direct logins to vicidial.php
|
||||
$win_valid_name = 'subwindow_launch'; # only window name to allow if validation enabled
|
||||
|
||||
# thin bar webphone settings:
|
||||
# Thin bar webphone settings:
|
||||
# $webphone_width = 1085; # set the webphone frame width
|
||||
# $webphone_height = 36; # set the webphone frame height
|
||||
# $webphone_pad = 0; # set the table cellpadding for the webphone
|
||||
# $webphone_location = 'bar'; # set the location on the agent screen 'right' or 'bar'
|
||||
|
||||
# Agent screen code injection options:
|
||||
$INSERT_head_script = ''; # inserted right above the <script language="Javascript"> line after logging in
|
||||
$INSERT_head_js = ''; # inserted after first javascript function
|
||||
$INSERT_first_onload = ''; # inserted at the beginning of the first section of the onload function
|
||||
$INSERT_window_onload = ''; # inserted at the end of the onload function
|
||||
$INSERT_agent_events = ''; # inserted within the agent_events function
|
||||
|
||||
# CORS settings: (to enable, customize the variables below, and uncomment the "require_once('agentCORS.php');" line at the bottom)
|
||||
# (NOTE: The first 3 variables must be set for these features to be active)
|
||||
$CORS_allowed_origin = ''; # if multiple origins allowed, separate them by a pipe (also allows PHP preg syntax)
|
||||
# examples: 'https://acme.org|https://internal.acme.org' or "https?:\/\/(.*\\.?example\\.com|localhost):?[0-9]*|null"
|
||||
$CORS_allowed_methods = ''; # if multiple methods allowed, separate them by a comma
|
||||
# example: 'GET,POST,OPTIONS,HEAD'
|
||||
$CORS_affected_scripts = ''; # use '--ALL--' for all agc scripts. If multiple(but less than all) scripts affected, separate them by a space
|
||||
# examples: 'api.php alt_display.php' or '--ALL--'
|
||||
$CORS_allowed_headers = ''; # passed in Access-Control-Allow-Headers http response header,
|
||||
# examples: X-Requested-With, X-Forwarded-For, X-Forwarded-Proto, Authorization, Cookie, Content-Type
|
||||
$CORS_allowed_credentials = 'N'; # 'Y' or 'N', whether to send credentials to browser or not
|
||||
$Xframe_options = 'N'; # Not part of CORS, but can prevent Iframe/embed/etc... use by foreign website, will populate for all affected scripts
|
||||
# examples: 'N', 'SAMEORIGIN', 'DENY' NOTE: using 'DENY' may break some agent screen functionality
|
||||
$CORS_debug = 0; # 0 = no, 1 = yes (default is no) This will generate a lot of log entries in a CORSdebug_log.txt file
|
||||
# require_once('agentCORS.php');
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user