Enable direct access by default (#6636)
* enabled direct access by default * removed obsolete direct access option test case * quick fix test * Set RESTController during tests * Properly handle RESTController * Documentation * revert changes * rerun tests * remove extra parse instance * Revert "remove extra parse instance" This reverts commit 21422f45f1548ebddddd1c4ccbc03a94b4994429. * Ensure restcontroller is set * Fix test * improved option docs * renamed direct access env var * added deprecations to README * added deprecation definition * fixed docs typo * improve promise rejection warning test * added renaming of env var to deprecation warning Co-authored-by: Diamond Lewis <findlewis@gmail.com>
This commit is contained in:
@@ -165,8 +165,11 @@ export interface ParseServerOptions {
|
||||
/* Sets the maximum size for the in memory cache, defaults to 10000
|
||||
:DEFAULT: 10000 */
|
||||
cacheMaxSize: ?number;
|
||||
/* Replace HTTP Interface when using JS SDK in current node runtime, defaults to false. Caution, this is an experimental feature that may not be appropriate for production.
|
||||
:ENV: PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS
|
||||
/* Set to `true` if Parse requests within the same Node.js environment as Parse Server should be routed to Parse Server directly instead of via the HTTP interface. Default is `false`.
|
||||
<br><br>
|
||||
If set to `false` then Parse requests within the same Node.js environment as Parse Server are executed as HTTP requests sent to Parse Server via the `serverURL`. For example, a `Parse.Query` in Cloud Code is calling Parse Server via a HTTP request. The server is essentially making a HTTP request to itself, unnecessarily using network resources such as network ports.
|
||||
<br><br>
|
||||
⚠️ In environments where multiple Parse Server instances run behind a load balancer and Parse requests within the current Node.js environment should be routed via the load balancer and distributed as HTTP requests among all instances via the `serverURL`, this should be set to `false`.
|
||||
:DEFAULT: false */
|
||||
directAccess: ?boolean;
|
||||
/* Enables the default express error handler for all errors
|
||||
|
||||
Reference in New Issue
Block a user