diff --git a/gh.png b/gh.png new file mode 100644 index 0000000..ccfdbb0 Binary files /dev/null and b/gh.png differ diff --git a/src/server.ts b/src/server.ts index 3ca689c..71ef583 100644 --- a/src/server.ts +++ b/src/server.ts @@ -146,6 +146,7 @@ export class BrowserServer { private setupMiddleware(): void { this.app.use(express.json()); + this.app.use(express.text({ type: '*/*' })); } private setupRoutes(): void { @@ -154,7 +155,7 @@ export class BrowserServer { private async handleCommand(req: Request, res: Response): Promise { try { - const cmd = req.body as BrowserCommand; + const cmd: BrowserCommand = typeof req.body === 'string' ? JSON.parse(req.body) : req.body; logCommand(cmd); if (cmd.cmd === 'close') { diff --git a/test.png b/test.png new file mode 100644 index 0000000..273f810 Binary files /dev/null and b/test.png differ