fix: raise Express JSON body limit to 25mb for OCR image payloads
Default 100kb limit rejected base64-encoded scanned page images with 413 Payload Too Large, breaking /documents/ocr-image for any realistic scan.
This commit is contained in:
+4
-1
@@ -17,7 +17,10 @@ const limiter = rateLimit({
|
||||
});
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
// Varsayılan limit (100kb) OCR için gönderilen base64 taranmış sayfa görsellerini
|
||||
// (300KB-1MB+ ham, base64 ile ~%33 daha büyük) kolayca aşıyordu ve 413 Payload
|
||||
// Too Large ile reddediliyordu — bkz. /documents/ocr-image.
|
||||
app.use(express.json({ limit: '25mb' }));
|
||||
|
||||
// If your app is behind a proxy (like Nginx, Docker ingress, etc.),
|
||||
// the IP will default to the proxy's IP. We set trust proxy to get the real client IP.
|
||||
|
||||
Reference in New Issue
Block a user