Skip to content

Commit 751ccf0

Browse files
authored
Update actionBodySizeLimit changeset and make minor (#15600)
* Update actionBodySizeLimit changeset and make minor * moar
1 parent b7dd447 commit 751ccf0

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

.changeset/young-cougars-mix.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
---
2-
'@astrojs/node': patch
3-
'astro': patch
2+
'astro': minor
43
---
54

6-
Make the body request limit a configurable
5+
Adds a new `security.actionBodySizeLimit` option to configure the maximum size of Astro Actions request bodies.
6+
7+
This lets you increase the default 1 MB limit when your actions need to accept larger payloads. For example, actions that handle file uploads or large JSON payloads can now opt in to a higher limit.
8+
9+
If you do not set this option, Astro continues to enforce the 1 MB default to help prevent abuse.
10+
11+
```js
12+
// astro.config.mjs
13+
export default defineConfig({
14+
security: {
15+
actionBodySizeLimit: 10 * 1024 * 1024 // set to 10 MB
16+
}
17+
})
18+
```

packages/astro/src/types/public/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ export interface AstroUserConfig<
640640
* @kind h4
641641
* @type {number}
642642
* @default `1048576` (1 MB)
643-
* @version 5.x.0
643+
* @version 5.18.0
644644
* @description
645645
*
646646
* Sets the maximum size in bytes allowed for action request bodies.

0 commit comments

Comments
 (0)