We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 910f427 commit 9acdda0Copy full SHA for 9acdda0
mimir-rag/src/server/server.ts
@@ -49,13 +49,13 @@ export async function createServer(options: ServerOptions = {}): Promise<{ app:
49
const logger = getLogger();
50
51
const app = express();
52
- app.use(
53
- express.json({
54
- verify: (req, _res, buf) => {
55
- (req as RequestWithRawBody).rawBody = Buffer.from(buf);
56
- },
57
- })
58
- );
+
+ const verifyRawBody = (req: any, _res: any, buf: Buffer) => {
+ (req as RequestWithRawBody).rawBody = Buffer.from(buf);
+ };
+ app.use(express.json({ verify: verifyRawBody }));
+ app.use(express.urlencoded({ extended: true, verify: verifyRawBody }));
59
app.use(applyCors);
60
61
// Apply API key middleware to all routes except /mcp/*, /webhook/*, and /health endpoints
0 commit comments