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
Copy file name to clipboardExpand all lines: docs/01-app/05-api-reference/05-config/01-next-config-js/taint.mdx
+5-6
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ version: experimental
6
6
7
7
## Usage
8
8
9
-
The `taint` option enables support for experimental React APIs for tainting objects and values. This feature helps prevent sensitive data from being accidentally passed to the client. When enabled, you can use:
9
+
The `taint` option enables support for experimental React APIs for tainting objects and values. This feature helps prevent sensitive data from being accidentally passed to the client. When enabled, you can use:
-[`experimental_taintUniqueValue`](https://react.dev/reference/react/experimental_taintUniqueValue) to taint unique values.
13
13
14
14
> **Good to know**: Activating this flag also enables the React `experimental` channel for `app` directory.
@@ -36,12 +36,11 @@ const nextConfig = {
36
36
module.exports= nextConfig
37
37
```
38
38
39
-
40
39
> **Warning:** Do not rely on the taint API as your only mechanism to prevent exposing sensitive data to the client. See our [security recommendations](/blog/security-nextjs-server-components-actions).
41
40
42
41
The taint APIs allows you to be defensive, by declaratively and explicitly marking data that is not allowed to pass through the Server-Client boundary. When an object or value, is passed through the Server-Client boundary, React throws an error.
43
42
44
-
This is helpful for cases where:
43
+
This is helpful for cases where:
45
44
46
45
- The methods to read data are out of your control
47
46
- You have to work with sensitive data shapes not defined by you
0 commit comments