diff --git a/dictation_server/src/main.ts b/dictation_server/src/main.ts index 04ae4b3..1f19992 100644 --- a/dictation_server/src/main.ts +++ b/dictation_server/src/main.ts @@ -14,8 +14,12 @@ helmetDirectives['navigate-to'] = ["'self'"]; helmetDirectives['style-src'] = ["'self'", 'https:']; helmetDirectives['report-uri'] = ["'self'"]; async function bootstrap() { - const app = await NestFactory.create(AppModule, { - cors: process.env.CORS === 'TRUE', + const app = await NestFactory.create(AppModule); + //XXX 特定のオリジンからのリクエストは許可する + app.enableCors({ + origin: 'http://localhost:8180', + methods: 'GET,PUT,POST,DELETE', + allowedHeaders: 'Content-Type', }); app.use( helmet({