diff --git a/backend/src/app.ts b/backend/src/app.ts index b68069d..360a9f3 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -38,6 +38,7 @@ async function registerPlugins(): Promise { await app.register(cors, { origin: true, credentials: true, + methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], }); logger.info('CORS 插件已注册'); }