Skip to content

Commit 774e680

Browse files
authored
fix(docs): clarify redirectInBrowser option (#32669)
Make clear that this isn't generally what people want.
1 parent 5f406a9 commit 774e680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby/src/redux/actions/public.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ const maybeAddPathPrefix = (path, pathPrefix) => {
13571357
* @param {string} redirect.fromPath Any valid URL. Must start with a forward slash
13581358
* @param {boolean} redirect.isPermanent This is a permanent redirect; defaults to temporary
13591359
* @param {string} redirect.toPath URL of a created page (see `createPage`)
1360-
* @param {boolean} redirect.redirectInBrowser Redirects are generally for redirecting legacy URLs to their new configuration. If you can't update your UI for some reason, set `redirectInBrowser` to true and Gatsby will handle redirecting in the client as well.
1360+
* @param {boolean} redirect.redirectInBrowser Redirects are generally for redirecting legacy URLs to their new configuration on the server. If you can't update your UI for some reason, set `redirectInBrowser` to true and Gatsby will handle redirecting in the client as well. You almost never need this so be sure your use case fits before enabling.
13611361
* @param {boolean} redirect.force (Plugin-specific) Will trigger the redirect even if the `fromPath` matches a piece of content. This is not part of the Gatsby API, but implemented by (some) plugins that configure hosting provider redirects
13621362
* @param {number} redirect.statusCode (Plugin-specific) Manually set the HTTP status code. This allows you to create a rewrite (status code 200) or custom error page (status code 404). Note that this will override the `isPermanent` option which also sets the status code. This is not part of the Gatsby API, but implemented by (some) plugins that configure hosting provider redirects
13631363
* @param {boolean} redirect.ignoreCase (Plugin-specific) Ignore case when looking for redirects

0 commit comments

Comments
 (0)