You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PagesRouter is a completely revamped router with many improvements over the current PublicAPIRouter. It handles requests for password reset and email verification, and serves assets in the /public directory such as webpages. It is an experimental replacement for the PublicAPIRouter, so it is still disabled by default.
Features
Inject dynamic content into any HTML site that could previously only be served as static asset.
Localization of feature pages (password reset, email verification) and custom pages (any HTML page).
Easily add custom routes to customize the password reset or email verification flow or add new flows.
Reduces network traffic by directly serving webpages instead of redirects.
Customize the endpoint path and public directory.
Usage
Caution, this is an experimental feature that may not be appropriate for production.
To enable the PagesRouter set the Parse Server configuration pages.enableRouter: true. Set the other options if you want to use features such as localization.
newParseServer({
...,pages: {enableRouter: true,// Enables the PageRouter by replacing the PublicAPIRouter; this is the general switch to turn on the experimental feature; default: falseenableLocalization: true,// Enables looking for locale matching page version on request; default: falselocalizationJsonPath: './private/localization.json',// The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale.localizationFallbackLocale: 'en',// 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.placeholders: {aKey: 'aValue'},// The placeholder keys and values which will be filled in pages; this can be a simple object or a callback function.forceRedirect: false,// Enables always sending redirect responses and never sending content directly; default: falsepagesPath: './pages/',// A custom path to the page files; also sets where the '/apps' endpoint points to; default: './public'.pagesEndpoint: 'pages',// A custom endpoint to the pages; also sets the '/apps' endpoint for password reset and email verification; default: 'apps'.}})
Pages Router
The
PagesRouter
is a completely revamped router with many improvements over the currentPublicAPIRouter
. It handles requests for password reset and email verification, and serves assets in the/public
directory such as webpages. It is an experimental replacement for thePublicAPIRouter
, so it is still disabled by default.Features
Usage
Caution, this is an experimental feature that may not be appropriate for production.
To enable the
PagesRouter
set the Parse Server configurationpages.enableRouter: true
. Set the other options if you want to use features such as localization.Factsheet
About
The text was updated successfully, but these errors were encountered: