Skip to content

Commit 717a48a

Browse files
Sync kit docs (#1496)
sync kit docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent a6e552e commit 717a48a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

apps/svelte.dev/content/docs/kit/98-reference/50-configuration.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,30 @@ Whether to check the incoming `origin` header for `POST`, `PUT`, `PATCH`, or `DE
264264

265265
To allow people to make `POST`, `PUT`, `PATCH`, or `DELETE` requests with a `Content-Type` of `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain` to your app from other origins, you will need to disable this option. Be careful!
266266

267+
</div>
268+
</div>
269+
<div class="ts-block-property">
270+
271+
```ts
272+
// @noErrors
273+
trustedOrigins?: string[];
274+
```
275+
276+
<div class="ts-block-property-details">
277+
278+
<div class="ts-block-property-bullets">
279+
280+
- <span class="tag">default</span> `[]`
281+
282+
</div>
283+
284+
An array of origins that are allowed to make cross-origin form submissions to your app, even when `checkOrigin` is `true`.
285+
286+
Each origin should be a complete origin including protocol (e.g., `https://payment-gateway.com`).
287+
This is useful for allowing trusted third-party services like payment gateways or authentication providers to submit forms to your app.
288+
289+
**Warning**: Only add origins you completely trust, as this bypasses CSRF protection for those origins.
290+
267291
</div>
268292
</div>
269293

0 commit comments

Comments
 (0)