Skip to content

Commit 787202d

Browse files
committed
feat: Remove deprecation DEPPS2: Config option directAccess defaults to true (parse-community#8284)
BREAKING CHANGE: Config option `directAccess` defaults to true; set this to `false` 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`.
1 parent 60b6c26 commit 787202d

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

DEPRECATIONS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following is a list of deprecations, according to the [Deprecation Policy](h
55
| ID | Change | Issue | Deprecation [ℹ️][i_deprecation] | Planned Removal [ℹ️][i_removal] | Status [ℹ️][i_status] | Notes |
66
|--------|-------------------------------------------------|----------------------------------------------------------------------|---------------------------------|---------------------------------|-----------------------|-------|
77
| DEPPS1 | Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/issues/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
8-
| DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
8+
| DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
99
| DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
1010
| DEPPS4 | Remove convenience method for http request `Parse.Cloud.httpRequest` | [#7589](https://github.com/parse-community/parse-server/pull/7589) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
1111
| DEPPS5 | Config option `allowClientClassCreation` defaults to `false` | [#7925](https://github.com/parse-community/parse-server/pull/7925) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |

spec/helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const defaultConfiguration = {
102102
masterKey: 'test',
103103
readOnlyMasterKey: 'read-only-test',
104104
fileKey: 'test',
105-
directAccess: false,
105+
directAccess: true,
106106
silent,
107107
logLevel,
108108
fileUpload: {

src/Deprecator/Deprecations.js

-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
* If there are no deprecations, this must return an empty array.
1717
*/
1818
module.exports = [
19-
{
20-
optionKey: 'directAccess',
21-
changeNewDefault: 'true',
22-
solution:
23-
"Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one.",
24-
},
2519
{ optionKey: 'enforcePrivateUsers', changeNewDefault: 'true' },
2620
{ optionKey: 'allowClientClassCreation', changeNewDefault: 'false' },
2721
{ optionKey: 'allowExpiredAuthDataToken', changeNewDefault: 'false' },

src/Options/Definitions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ module.exports.ParseServerOptions = {
173173
help:
174174
'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>\u26A0\uFE0F 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`.',
175175
action: parsers.booleanParser,
176-
default: false,
176+
default: true,
177177
},
178178
dotNetKey: {
179179
env: 'PARSE_SERVER_DOT_NET_KEY',

src/Options/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export interface ParseServerOptions {
216216
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.
217217
<br><br>
218218
⚠️ 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`.
219-
:DEFAULT: false */
219+
:DEFAULT: true */
220220
directAccess: ?boolean;
221221
/* Enables the default express error handler for all errors
222222
:DEFAULT: false */

0 commit comments

Comments
 (0)