Skip to main content
Overriding a route allows you to change or completely replace a Forest’s route behavior.

Changing Forest’s behavior

To achieve this, use existing snippets of default routes and modify them according to your needs. Here are a few examples:

Use extended search by default

With this snippet, only the companies collection would use extended search by default.
Using extended search is less performant than default search. Use this wisely.

Protect a specific record

Replacing Forest’s behavior

To achieve this, simply remove the next() statement of any route:
For instance, if you have a Users collection, you might want to create your users via your own api: