Skip to content

Commit 577ab8f

Browse files
authored
fix: Add configure pages router option (#115)
* fix: Add configure pages router option * Update release.yml
1 parent 409d336 commit 577ab8f

File tree

8 files changed

+20
-1
lines changed

8 files changed

+20
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
tags: [ '*.*.*', '*.*.*-*' ]
66

77
env:
8-
LATEST: '7.4.2'
8+
LATEST: '7.4.3'
99
REGISTRY: docker.io
1010
IMAGE_NAME: ${{ github.repository }}
1111

app.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@
245245
"description": "If set to `true`, a `Parse.Object` that is in the payload when calling a Cloud Function will be converted to an instance of `Parse.Object`. If `false`, the object will not be converted and instead be a plain JavaScript object, which contains the raw data of a `Parse.Object` but is not an actual instance of `Parse.Object`. Default is `false`. The expected behavior would be that the object is converted to an instance of `Parse.Object`, so you would normally set this option to `true`. The default is `false` because this is a temporary option that has been introduced to avoid a breaking change when fixing a bug where JavaScript objects are not converted to actual instances of `Parse.Object`.",
246246
"value": "true"
247247
},
248+
"PARSE_SERVER_PAGES_ENABLE_ROUTER": {
249+
"description": "Is true if the pages router should be enabled; this is required for any of the pages options to take effect.",
250+
"value": "true"
251+
},
248252
"PARSE_SERVER_DIRECT_ACCESS": {
249253
"description": "WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres.",
250254
"value": "false"

docker-compose.dashboard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
PARSE_SERVER_ALLOW_CUSTOM_OBJECTID: 'true' # Required to be true for ParseCareKit
2424
PARSE_SERVER_ENABLE_SCHEMA_HOOKS: 'true'
2525
PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION: 'true'
26+
PARSE_SERVER_PAGES_ENABLE_ROUTER": 'true'
2627
PARSE_SERVER_DIRECT_ACCESS: 'false' # WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres
2728
PARSE_SERVER_ENABLE_PRIVATE_USERS: 'true'
2829
PARSE_SERVER_USING_PARSECAREKIT: 'true' # If you are not using ParseCareKit, set this to 'false'

docker-compose.mongo.dashboard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
PARSE_SERVER_ALLOW_CUSTOM_OBJECTID: 'true' # Required to be true for ParseCareKit
2424
PARSE_SERVER_ENABLE_SCHEMA_HOOKS: 'true'
2525
PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION: 'true'
26+
PARSE_SERVER_PAGES_ENABLE_ROUTER": 'true'
2627
PARSE_SERVER_DIRECT_ACCESS: 'false' # WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres
2728
PARSE_SERVER_ENABLE_PRIVATE_USERS: 'true'
2829
PARSE_SERVER_USING_PARSECAREKIT: 'true' # If you are not using ParseCareKit, set this to 'false'

docker-compose.mongo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
PARSE_SERVER_ALLOW_CUSTOM_OBJECTID: 'true' # Required to be true for ParseCareKit
2424
PARSE_SERVER_ENABLE_SCHEMA_HOOKS: 'true'
2525
PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION: 'true'
26+
PARSE_SERVER_PAGES_ENABLE_ROUTER": 'true'
2627
PARSE_SERVER_DIRECT_ACCESS: 'false' # WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres
2728
PARSE_SERVER_ENABLE_PRIVATE_USERS: 'true'
2829
PARSE_SERVER_USING_PARSECAREKIT: 'true' # If you are not using ParseCareKit, set this to 'false'

docker-compose.no.hipaa.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
PARSE_SERVER_ALLOW_CUSTOM_OBJECTID: 'true' # Required to be true for ParseCareKit
2424
PARSE_SERVER_ENABLE_SCHEMA_HOOKS: 'true'
2525
PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION: 'true'
26+
PARSE_SERVER_PAGES_ENABLE_ROUTER": 'true'
2627
PARSE_SERVER_DIRECT_ACCESS: 'false' # WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres
2728
PARSE_SERVER_ENABLE_PRIVATE_USERS: 'true'
2829
PARSE_SERVER_USING_PARSECAREKIT: 'false' # If you are not using ParseCareKit, set this to 'false'

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
PARSE_SERVER_ALLOW_CUSTOM_OBJECTID: 'true' # Required to be true for ParseCareKit
2424
PARSE_SERVER_ENABLE_SCHEMA_HOOKS: 'true'
2525
PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION: 'true'
26+
PARSE_SERVER_PAGES_ENABLE_ROUTER": 'true'
2627
PARSE_SERVER_DIRECT_ACCESS: 'false' # WARNING: Setting to 'true' is known to cause crashes on parse-hipaa running postgres
2728
PARSE_SERVER_ENABLE_PRIVATE_USERS: 'true'
2829
PARSE_SERVER_USING_PARSECAREKIT: 'true' # If you are not using ParseCareKit, set this to 'false'

parse/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ if (process.env.PARSE_SERVER_ENCODE_PARSE_OBJECT_IN_CLOUD_FUNCTION == 'true') {
114114
encodeParseObjectInCloudFunction = true
115115
}
116116

117+
let enablePagesRouter = false;
118+
if (process.env.PARSE_SERVER_PAGES_ENABLE_ROUTER == 'true') {
119+
enablePagesRouter = true
120+
}
121+
122+
const pagesOptions = {
123+
enableRouter: enablePagesRouter,
124+
};
125+
117126
let useDirectAccess = false;
118127
if (process.env.PARSE_SERVER_DIRECT_ACCESS == 'true') {
119128
useDirectAccess = true
@@ -299,6 +308,7 @@ configuration = {
299308
enforcePrivateUsers: enforcePrivateUsers,
300309
jsonLogs: jsonLogs,
301310
logsFolder: logsFolder,
311+
pages: pagesOptions,
302312
preserveFileName: preserveFileName,
303313
revokeSessionOnPasswordReset: revokeSessionOnPasswordReset,
304314
sessionLength: sessionLength,

0 commit comments

Comments
 (0)