Skip to content

Commit 21c732e

Browse files
Theodor N. EngøyTheodor N. Engøy
authored andcommitted
style: prettier
1 parent ad18ada commit 21c732e

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

examples/server/src/honoWebStandardStreamableHttp.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ import { Hono } from 'hono';
1414
import { cors } from 'hono/cors';
1515
import * as z from 'zod/v4';
1616

17-
const LOCALHOST_ORIGINS = [
18-
/^http:\/\/localhost(?::\d+)?$/,
19-
/^http:\/\/127\.0\.0\.1(?::\d+)?$/,
20-
/^http:\/\/\[::1\](?::\d+)?$/
21-
];
17+
const LOCALHOST_ORIGINS = [/^http:\/\/localhost(?::\d+)?$/, /^http:\/\/127\.0\.0\.1(?::\d+)?$/, /^http:\/\/\[::1\](?::\d+)?$/];
2218

2319
// Create the MCP server
2420
const server = new McpServer({

examples/server/src/simpleStreamableHttp.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,7 @@ const app = createMcpExpressApp();
508508
app.use(
509509
cors({
510510
exposedHeaders: ['WWW-Authenticate', 'Mcp-Session-Id', 'Last-Event-Id', 'Mcp-Protocol-Version'],
511-
origin: [
512-
/^http:\/\/localhost(?::\d+)?$/,
513-
/^http:\/\/127\.0\.0\.1(?::\d+)?$/,
514-
/^http:\/\/\[::1\](?::\d+)?$/
515-
] // Default to localhost for demo safety. In production, configure this explicitly.
511+
origin: [/^http:\/\/localhost(?::\d+)?$/, /^http:\/\/127\.0\.0\.1(?::\d+)?$/, /^http:\/\/\[::1\](?::\d+)?$/] // Default to localhost for demo safety. In production, configure this explicitly.
516512
})
517513
);
518514

0 commit comments

Comments
 (0)