From 01de683c7d7b9c1172b8387a4200fe79da4802e8 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:28:48 +0000 Subject: [PATCH 1/3] remove --- README.md | 2 -- spec/PagesRouter.spec.js | 3 --- src/Config.js | 5 ----- 3 files changed, 10 deletions(-) diff --git a/README.md b/README.md index e0a10a79d2..2293b145da 100644 --- a/README.md +++ b/README.md @@ -425,7 +425,6 @@ The following paths are already used by Parse Server's built-in features and are | Parameter | Optional | Type | Default value | Example values | Environment variable | Description | | ---------------------------- | -------- | --------------- | ------------- | --------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `pages` | yes | `Object` | `undefined` | - | `PARSE_SERVER_PAGES` | The options for pages such as password reset and email verification. | -| `pages.enableRouter` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_ROUTER` | Is `true` if the pages router should be enabled; this is required for any of the pages options to take effect. | | `pages.customRoutes` | yes | `Array` | `[]` | - | `PARSE_SERVER_PAGES_CUSTOM_ROUTES` | The custom routes. The routes are added in the order they are defined here, which has to be considered since requests traverse routes in an ordered manner. Custom routes are traversed after build-in routes such as password reset and email verification. | | `pages.customRoutes.method` | | `String` | - | `GET`, `POST` | - | The HTTP method of the custom route. | | `pages.customRoutes.path` | | `String` | - | `custom_page` | - | The path of the custom route. Note that the same path can used if the `method` is different, for example a path `custom_page` can have two routes, a `GET` and `POST` route, which will be invoked depending on the HTTP request method. | @@ -760,7 +759,6 @@ The following parameter and placeholder keys are reserved because they are used | Parameter | Optional | Type | Default value | Example values | Environment variable | Description | | ----------------------------------------------- | -------- | ------------------------------------- | -------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pages` | yes | `Object` | `undefined` | - | `PARSE_SERVER_PAGES` | The options for pages such as password reset and email verification. | -| `pages.enableRouter` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_ROUTER` | Is `true` if the pages router should be enabled; this is required for any of the pages options to take effect. | | `pages.enableLocalization` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_LOCALIZATION` | Is true if pages should be localized; this has no effect on custom page redirects. | | `pages.localizationJsonPath` | yes | `String` | `undefined` | `./private/translations.json` | `PARSE_SERVER_PAGES_LOCALIZATION_JSON_PATH` | The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale. | | `pages.localizationFallbackLocale` | yes | `String` | `en` | `en`, `en-GB`, `default` | `PARSE_SERVER_PAGES_LOCALIZATION_FALLBACK_LOCALE` | The fallback locale for localization if no matching translation is provided for the given locale. This is only relevant when providing translation resources via JSON file. | diff --git a/spec/PagesRouter.spec.js b/spec/PagesRouter.spec.js index db2250f15a..39c6b0c5d7 100644 --- a/spec/PagesRouter.spec.js +++ b/spec/PagesRouter.spec.js @@ -207,9 +207,6 @@ describe('Pages Router', () => { describe('server options', () => { it('uses default configuration when none is set', async () => { await reconfigureServerWithPagesConfig({}); - expect(Config.get(Parse.applicationId).pages.enableRouter).toBe( - Definitions.PagesOptions.enableRouter.default - ); expect(Config.get(Parse.applicationId).pages.enableLocalization).toBe( Definitions.PagesOptions.enableLocalization.default ); diff --git a/src/Config.js b/src/Config.js index 8af67cd543..dce5651c48 100644 --- a/src/Config.js +++ b/src/Config.js @@ -293,11 +293,6 @@ export class Config { if (Object.prototype.toString.call(pages) !== '[object Object]') { throw 'Parse Server option pages must be an object.'; } - if (pages.enableRouter === undefined) { - pages.enableRouter = PagesOptions.enableRouter.default; - } else if (!isBoolean(pages.enableRouter)) { - throw 'Parse Server option pages.enableRouter must be a boolean.'; - } if (pages.enableLocalization === undefined) { pages.enableLocalization = PagesOptions.enableLocalization.default; } else if (!isBoolean(pages.enableLocalization)) { From 09b8aff5e7f3716af7716204da517b2249cccdde Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:48:29 +0000 Subject: [PATCH 2/3] remove from tests, docs, interface --- README.md | 6 ------ spec/PagesRouter.spec.js | 12 ------------ src/Options/Definitions.js | 6 ------ src/Options/docs.js | 1 - src/Options/index.js | 3 --- types/Options/index.d.ts | 1 - 6 files changed, 29 deletions(-) diff --git a/README.md b/README.md index 2293b145da..4183a0acf1 100644 --- a/README.md +++ b/README.md @@ -388,7 +388,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, customRoutes: [{ method: 'GET', path: 'custom_route', @@ -581,7 +580,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, enableLocalization: true, } } @@ -634,7 +632,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, enableLocalization: true, customUrls: { passwordReset: 'https://example.com/page.html' @@ -696,7 +693,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, enableLocalization: true, localizationJsonPath: './private/localization.json', localizationFallbackLocale: 'en' @@ -724,7 +720,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, placeholders: { exampleKey: 'exampleValue' } @@ -739,7 +734,6 @@ const api = new ParseServer({ ...otherOptions, pages: { - enableRouter: true, placeholders: async (params) => { const value = await doSomething(params.locale); return { diff --git a/spec/PagesRouter.spec.js b/spec/PagesRouter.spec.js index 39c6b0c5d7..644cd650be 100644 --- a/spec/PagesRouter.spec.js +++ b/spec/PagesRouter.spec.js @@ -24,7 +24,6 @@ describe('Pages Router', () => { appId: 'test', appName: 'exampleAppname', publicServerURL: 'http://localhost:8378/1', - pages: { enableRouter: true }, }; await reconfigureServer(config); }); @@ -66,7 +65,6 @@ describe('Pages Router', () => { it('responds with 404 if publicServerURL is not configured', async () => { await reconfigureServer({ appName: 'unused', - pages: { enableRouter: true }, }); const urls = [ 'http://localhost:8378/1/apps/test/verify_email', @@ -99,7 +97,6 @@ describe('Pages Router', () => { await reconfigureServer({ appName: 'exampleAppname', publicServerURL: 'http://localhost:8378/1', - pages: { enableRouter: true }, }); }); @@ -190,7 +187,6 @@ describe('Pages Router', () => { }, publicServerURL: 'http://localhost:8378/1', pages: { - enableRouter: true, enableLocalization: true, customUrls: {}, }, @@ -240,10 +236,6 @@ describe('Pages Router', () => { 'a', 0, true, - { enableRouter: 'a' }, - { enableRouter: 0 }, - { enableRouter: {} }, - { enableRouter: [] }, { enableLocalization: 'a' }, { enableLocalization: 0 }, { enableLocalization: {} }, @@ -1189,7 +1181,6 @@ describe('Pages Router', () => { verifyUserEmails: true, emailAdapter, publicServerURL: () => 'http://localhost:8378/1', - pages: { enableRouter: true }, }); const user = new Parse.User(); @@ -1219,7 +1210,6 @@ describe('Pages Router', () => { verifyUserEmails: true, emailAdapter, publicServerURL: () => 'http://localhost:8378/1', - pages: { enableRouter: true }, }); const response = await request({ @@ -1242,7 +1232,6 @@ describe('Pages Router', () => { appId: 'test', appName: 'exampleAppname', publicServerURL: 'http://localhost:8378/1', - pages: { enableRouter: true }, }); // Request the password reset page with an invalid token; @@ -1267,7 +1256,6 @@ describe('Pages Router', () => { appId: 'test', appName: 'exampleAppname', publicServerURL: 'http://localhost:8378/1', - pages: { enableRouter: true }, }); }); diff --git a/src/Options/Definitions.js b/src/Options/Definitions.js index 7a3c5043df..c342eef1b6 100644 --- a/src/Options/Definitions.js +++ b/src/Options/Definitions.js @@ -688,12 +688,6 @@ module.exports.PagesOptions = { action: parsers.booleanParser, default: false, }, - enableRouter: { - env: 'PARSE_SERVER_PAGES_ENABLE_ROUTER', - help: 'Is true if the pages router should be enabled; this is required for any of the pages options to take effect.', - action: parsers.booleanParser, - default: false, - }, forceRedirect: { env: 'PARSE_SERVER_PAGES_FORCE_REDIRECT', help: 'Is true if responses should always be redirects and never content, false if the response type should depend on the request type (GET request -> content response; POST request -> redirect response).', diff --git a/src/Options/docs.js b/src/Options/docs.js index bbe4bf56ed..53f21297b0 100644 --- a/src/Options/docs.js +++ b/src/Options/docs.js @@ -137,7 +137,6 @@ * @property {PagesRoute[]} customRoutes The custom routes. * @property {PagesCustomUrlsOptions} customUrls The URLs to the custom pages. * @property {Boolean} enableLocalization Is true if pages should be localized; this has no effect on custom page redirects. - * @property {Boolean} enableRouter Is true if the pages router should be enabled; this is required for any of the pages options to take effect. * @property {Boolean} forceRedirect Is true if responses should always be redirects and never content, false if the response type should depend on the request type (GET request -> content response; POST request -> redirect response). * @property {String} localizationFallbackLocale The fallback locale for localization if no matching translation is provided for the given locale. This is only relevant when providing translation resources via JSON file. * @property {String} localizationJsonPath The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale. diff --git a/src/Options/index.js b/src/Options/index.js index 263154f9d6..f4fd8bd253 100644 --- a/src/Options/index.js +++ b/src/Options/index.js @@ -420,9 +420,6 @@ export interface SecurityOptions { } export interface PagesOptions { - /* Is true if the pages router should be enabled; this is required for any of the pages options to take effect. - :DEFAULT: false */ - enableRouter: ?boolean; /* Is true if pages should be localized; this has no effect on custom page redirects. :DEFAULT: false */ enableLocalization: ?boolean; diff --git a/types/Options/index.d.ts b/types/Options/index.d.ts index 4b2e75fb2c..b8bfa8a83d 100644 --- a/types/Options/index.d.ts +++ b/types/Options/index.d.ts @@ -156,7 +156,6 @@ export interface SecurityOptions { checkGroups?: (CheckGroup[]); } export interface PagesOptions { - enableRouter?: boolean; enableLocalization?: boolean; localizationJsonPath?: string; localizationFallbackLocale?: string; From 3c51ac0e8d4b6014fa4dc73b435d30c7c257edc3 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sat, 21 Feb 2026 17:19:03 +0000 Subject: [PATCH 3/3] fix tests --- spec/PagesRouter.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/PagesRouter.spec.js b/spec/PagesRouter.spec.js index 644cd650be..97b81747c4 100644 --- a/spec/PagesRouter.spec.js +++ b/spec/PagesRouter.spec.js @@ -24,6 +24,7 @@ describe('Pages Router', () => { appId: 'test', appName: 'exampleAppname', publicServerURL: 'http://localhost:8378/1', + pages: {}, }; await reconfigureServer(config); });