🐛(y-provider) increase JSON size limits for transcription conversion

Problem:
- Default Express JSON parser limit (100kb) is insufficient for larger
 transcription files
- 2-hour audio transcriptions slightly exceed the 100kb limit, causing request
 failures

Solution:
- Implemented custom middleware to apply different JSON parser configurations
 based on route
- Applied 500kb limit specifically for transcription conversion endpoints
- Maintained default limits for all other routes to preserve security

Technical notes:
- Could not find a built-in Express solution to specify parser config per route
- Custom middleware conditionally applies the appropriate parser configuration
This commit is contained in:
lebaudantoine
2025-05-21 11:49:53 +02:00
parent 7b9c362d38
commit 3f2d84bf62
3 changed files with 40 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ and this project adheres to
- ✅(frontend) Improve tests coverage
- ⬆️(docker) upgrade backend image to python 3.13 #973
- ⬆️(docker) upgrade node images to alpine 3.21
- 🐛(y-provider) increase JSON size limits for transcription conversion
### Removed