Skip to content

Commit acc1796

Browse files
author
Lasim
committed
chore(gateway): update CORS configuration to use @fastify/cors
1 parent 2459065 commit acc1796

File tree

1 file changed

+3
-2
lines changed
  • services/gateway/src/core/server

1 file changed

+3
-2
lines changed

services/gateway/src/core/server/proxy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import Fastify, { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
3-
import cors from '@fastify/cors';
43
import helmet from '@fastify/helmet';
54

5+
import type { FastifyCorsOptions } from '@fastify/cors';
6+
67
import chalk from 'chalk';
78
import { ProcessManager, ProcessInfo } from '../process/manager';
89
import { MCPConfigService } from '../mcp';
@@ -149,7 +150,7 @@ export class ProxyServer {
149150
this.fastify.register(helmet as any);
150151

151152
// CORS configuration
152-
this.fastify.register(cors, {
153+
this.fastify.register(require('@fastify/cors'), {
153154
origin: ['http://localhost:3000', 'https://claude.ai'],
154155
methods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
155156
allowedHeaders: [

0 commit comments

Comments
 (0)