Skip to content

Commit fcb372b

Browse files
author
Kazuki Nakajima
committed
Update proxy.php
1 parent bc143ff commit fcb372b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

proxy.php

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

174176
$url_query_param = null; // 'url'
175177
$url_header = 'HTTP_SALESFORCEPROXY_ENDPOINT';
@@ -201,7 +203,7 @@
201203
$status['http_code'] = 400;
202204
$status['status_text'] = 'Bad Request';
203205

204-
} else if ( !preg_match( $valid_url_regex, $url ) ) {
206+
} else if ( !preg_match( $valid_forcecom_url_regex, $url ) && !preg_match( $valid_databasecom_url_regex, $url )) {
205207

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

0 commit comments

Comments
 (0)