Skip to content

Commit 697e61a

Browse files
RahulHeredIvYaNshhh
authored andcommitted
Foramt code
1 parent 4111708 commit 697e61a

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

examples/auth/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ async function startServer() {
9898

9999
// Log ALL incoming requests
100100
app.use((req: Request, _res: Response, next: Function) => {
101-
console.log(`🌐 ${req.method} ${req.path} [session: ${req.headers['mcp-session-id'] || 'none'}] [auth: ${req.headers['authorization'] ? 'yes' : 'no'}]`);
101+
console.log(
102+
`🌐 ${req.method} ${req.path} [session: ${req.headers['mcp-session-id'] || 'none'}] [auth: ${req.headers['authorization'] ? 'yes' : 'no'}]`
103+
);
102104
next();
103105
});
104106

examples/auth/src/server.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,13 @@ export class MCPServer {
118118
}
119119

120120
// Pass the parsed body from Express to avoid re-parsing
121-
console.log(`🔄 Handling request: method=${req.body?.method}, session=${transport.sessionId || 'pending'}`);
121+
console.log(
122+
`🔄 Handling request: method=${req.body?.method}, session=${transport.sessionId || 'pending'}`
123+
);
122124
await transport.handleRequest(nodeReq, nodeRes, req.body);
123-
console.log(`✅ Request handled: method=${req.body?.method}, session=${transport.sessionId}, status=${res.statusCode}`);
125+
console.log(
126+
`✅ Request handled: method=${req.body?.method}, session=${transport.sessionId}, status=${res.statusCode}`
127+
);
124128

125129
// Ensure transport is stored after handleRequest (session ID may be set now)
126130
if (transport.sessionId && !this.transports.has(transport.sessionId)) {

src/auth/routes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ export function registerOAuthRoutes(
194194
const data = await response.text();
195195
res
196196
.status(response.status)
197-
.set('Content-Type', response.headers.get('content-type') || 'application/json')
197+
.set(
198+
'Content-Type',
199+
response.headers.get('content-type') || 'application/json'
200+
)
198201
.send(data);
199202
} catch (err) {
200203
console.error('❌ Token proxy error:', err);

0 commit comments

Comments
 (0)