Commit ae21fc1
authored
chore: reduce custom API max payload size to 2 MB (#1221)
## Problem
Large payloads may cause performance issues on the frontend.
## Solution
Reduce payload size to 2 MB, which is a reasonable size for a reasonably
large payload from various sources such as data.gov.sg
## Tests
- [ ] Custom API calls should still work as per normal (most custom API
actions receive less than 2 MB)
- [ ] Test with large payload (e.g.,
`https://api-production.data.gov.sg/v2/public/api/datasets/d_3f960c10fed6145404ca7b821f263b87/list-rows?limit=10000`,
should get `Payload too large` error)
## Screenshots
<img width="896" height="449" alt="Screenshot 2025-09-19 at 9 45 47 AM"
src="https://github.com/user-attachments/assets/6b90b89c-dc99-4b62-a7da-f6d7674c2cd4"
/>1 parent e934acd commit ae21fc1
File tree
2 files changed
+8
-4
lines changed- packages/backend/src/apps/custom-api
- __tests__/common
- common
2 files changed
+8
-4
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | | - | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
0 commit comments