Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 4954955

Browse files
committed
Add support for cloudforce.com instances
Allow proxy to send requests to cloudforce.com instances in addition to *.salesforce.com and *.database.com ones.
1 parent 6f9efca commit 4954955

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

proxy.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@
169169
// Change these configuration options if needed, see above descriptions for info.
170170
$enable_jsonp = false;
171171
$enable_native = true;
172-
$valid_forcecom_url_regex = '/https:\/\/.*.salesforce.com/';
173-
$valid_databasecom_url_regex = '/https:\/\/.*database.com/';
172+
$valid_forcecom_url_regex = '/https:\/\/.*\.(salesforce|database|cloudforce)\.com/';
174173

175174

176175
$url_query_param = null; // 'url'
@@ -203,7 +202,7 @@
203202
$status['http_code'] = 400;
204203
$status['status_text'] = 'Bad Request';
205204

206-
} else if ( !preg_match( $valid_forcecom_url_regex, $url ) && !preg_match( $valid_databasecom_url_regex, $url )) {
205+
} else if ( !preg_match( $valid_forcecom_url_regex, $url )) {
207206

208207
// Passed url doesn't match $valid_url_regex.
209208
$contents = 'ERROR: invalid url';

0 commit comments

Comments
 (0)