Skip to content

Commit c97fd4c

Browse files
committed
Merge branch 'main' into release-next
2 parents 726b524 + edb74b8 commit c97fd4c

File tree

11 files changed

+15152
-7
lines changed

11 files changed

+15152
-7
lines changed

contributors.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
- maruffahmed
217217
- marvinruder
218218
- mathpaquette
219+
- matmilbury
219220
- matt-harro
220221
- matthewlynch
221222
- maximevtush
@@ -242,6 +243,7 @@
242243
- mtliendo
243244
- namoscato
244245
- ned-park
246+
- nenene3
245247
- nikeee
246248
- nilubisan
247249
- Nismit
@@ -303,6 +305,7 @@
303305
- SimenB
304306
- SkayuX
305307
- skratchdot
308+
- smff
306309
- smithki
307310
- soartec-lab
308311
- sorokya

docs/api/hooks/useNavigate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function SomeComponent() {
2727
}
2828
```
2929

30-
It's often better to use [redirect](../Utils/redirect) in [ActionFunction](../Other/ActionFunction) and [LoaderFunction](../Other/LoaderFunction) than this hook.
30+
It's often better to use [redirect](../utils/redirect) in [ActionFunction](../Other/ActionFunction) and [LoaderFunction](../Other/LoaderFunction) than this hook.
3131

3232
## Signature
3333

docs/explanation/sessions-and-cookies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function action({
7272
}
7373
```
7474

75-
See the [Session API][session-api] for more all the methods available on the session object.
75+
See the [Session API][session-api] for all methods available on the session object.
7676

7777
### Login form example
7878

docs/how-to/security.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Security
3+
---
4+
5+
# Security
6+
7+
This is by no means a comprehensive guide, but React Router provides features to help address a few aspects under the _very large_ umbrella that is _Security_.
8+
9+
## `Content-Security-Policy`
10+
11+
If you are implementing a [Content-Security-Policy (CSP)][csp] in your application, specifically one using the `unsafe-inline` directive, you will need to specify a [`nonce`][nonce] attribute on the inline `<script>` elements rendered in your HTML. This must be specified on any API that generates inline scripts, including:
12+
13+
- [`<Scripts nonce>`][scripts] (`root.tsx`)
14+
- [`<ScrollRestoration nonce>`][scrollrestoration] (`root.tsx`)
15+
- [`<ServerRouter nonce>`][serverrouter] (`entry.server.tsx`)
16+
- [`renderToPipeableStream(..., { nonce })`][renderToPipeableStream] (`entry.server.tsx`)
17+
- [`renderToReadableStream(..., { nonce })`][renderToReadableStream] (`entry.server.tsx`)
18+
19+
[csp]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP
20+
[nonce]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
21+
[renderToPipeableStream]: https://react.dev/reference/react-dom/server/renderToPipeableStream
22+
[renderToReadableStream]: https://react.dev/reference/react-dom/server/renderToReadableStream
23+
[scripts]: ../api/components/Scripts
24+
[scrollrestoration]: ../api/components/ScrollRestoration
25+
[serverrouter]: ../api/components/ServerRouter

docs/start/data/data-loading.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ function MyRoute() {
3838
```
3939

4040
As the user navigates between routes, the loaders are called before the route component is rendered.
41+
42+
---
43+
44+
Next: [Actions](./actions)

docs/start/data/route-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ createBrowserRouter([
181181

182182
---
183183

184-
Next: [Rendering Strategies](./rendering)
184+
Next: [Data Loading](./data-loading)
185185

186186
[loader-params]: https://api.reactrouter.com/v7/interfaces/react_router.LoaderFunctionArgs

docs/start/declarative/navigating.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,7 @@ export function LoginPage() {
127127
);
128128
}
129129
```
130+
131+
---
132+
133+
Next: [Url values](./url-values)

docs/start/declarative/routing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,7 @@ function Header() {
231231
);
232232
}
233233
```
234+
235+
---
236+
237+
Next: [Navigating](./navigating)

docs/upgrading/component-routes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ The first few routes you migrate are the hardest because you often have to acces
343343

344344
## Enable SSR and/or Pre-rendering
345345

346-
If you want to enable server rendering and static pre-rendering, you can do so with the `ssr` and `prerender` options in the bundler plugin. For SSR you'll need to also deploy the server build to a server. See [Deploying][deploying] for more information.
346+
If you want to enable server rendering and static pre-rendering, you can do so with the `ssr` and `prerender` options in the bundler plugin. For SSR you'll need to also deploy the server build to a server.
347347

348348
```ts filename=react-router.config.ts
349349
import type { Config } from "@react-router/dev/config";
@@ -357,7 +357,6 @@ export default {
357357
```
358358

359359
[upgrade-router-provider]: ./router-provider
360-
[deploying]: ../start/deploying
361360
[configuring-routes]: ../start/framework/routing
362361
[route-modules]: ../start/framework/route-module
363362
[type-safety]: ../how-to/route-module-type-safety

docs/upgrading/router-provider.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ You can checkout [Type Safety][type-safety] to learn how to fully setup and use
422422

423423
## Enable SSR and/or Pre-rendering
424424

425-
If you want to enable server rendering and static pre-rendering, you can do so with the `ssr` and `prerender` options in the bundler plugin. For SSR you'll need to also deploy the server build to a server. See [Deploying][deploying] for more information.
425+
If you want to enable server rendering and static pre-rendering, you can do so with the `ssr` and `prerender` options in the bundler plugin. For SSR you'll need to also deploy the server build to a server.
426426

427427
```ts filename=react-router.config.ts
428428
import type { Config } from "@react-router/dev/config";
@@ -436,7 +436,6 @@ export default {
436436
```
437437

438438
[upgrade-component-routes]: ./component-routes
439-
[deploying]: ../start/deploying
440439
[configuring-routes]: ../start/framework/routing
441440
[route-modules]: ../start/framework/route-module
442441
[type-safety]: ../how-to/route-module-type-safety

0 commit comments

Comments
 (0)