From fcb372b78e1efedc1132a4cee11a3f6a0c8cf47d Mon Sep 17 00:00:00 2001 From: Kazuki Nakajima Date: Sat, 28 Jan 2012 17:53:58 +0900 Subject: [PATCH] Update proxy.php --- proxy.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proxy.php b/proxy.php index cca675e..fdc47ff 100644 --- a/proxy.php +++ b/proxy.php @@ -169,7 +169,9 @@ // Change these configuration options if needed, see above descriptions for info. $enable_jsonp = false; $enable_native = true; -$valid_url_regex = '/https:\/\/.*salesforce.com/'; +$valid_forcecom_url_regex = '/https:\/\/.*.salesforce.com/'; +$valid_databasecom_url_regex = '/https:\/\/.*database.com/'; + $url_query_param = null; // 'url' $url_header = 'HTTP_SALESFORCEPROXY_ENDPOINT'; @@ -201,7 +203,7 @@ $status['http_code'] = 400; $status['status_text'] = 'Bad Request'; -} else if ( !preg_match( $valid_url_regex, $url ) ) { +} else if ( !preg_match( $valid_forcecom_url_regex, $url ) && !preg_match( $valid_databasecom_url_regex, $url )) { // Passed url doesn't match $valid_url_regex. $contents = 'ERROR: invalid url';