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/api/framework-conventions/react-router.config.ts.md
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,45 @@ export default {
30
30
31
31
## Options
32
32
33
+
### `allowedActionOrigins`
34
+
35
+
An array of allowed origin hosts for action submissions to UI routes (does not apply to resource routes). Supports micromatch glob patterns (`*` to match one segment, `**` to match multiple).
36
+
37
+
```tsx filename=react-router.config.ts
38
+
exportdefault {
39
+
allowedActionOrigins: [
40
+
"example.com",
41
+
"*.example.com", // sub.example.com
42
+
"**.example.com", // sub.domain.example.com
43
+
],
44
+
} satisfiesConfig;
45
+
```
46
+
47
+
If you need to set this value at runtime, you can do in by setting the value on the server build in your custom server. For example, when using `express`:
- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
322
+
313
323
-`createCookie`
314
324
-`createCookieSessionStorage`
315
325
-`createMemorySessionStorage`
@@ -318,6 +328,7 @@
318
328
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
319
329
320
330
Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
0 commit comments