From 750c0d7df27eeab4caf0133cd3ba338940828533 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jun 2018 11:27:20 +0900 Subject: [PATCH] Use wildcard --- src/server/api/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/api/index.ts b/src/server/api/index.ts index 23203d9147..c39911c35f 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -14,7 +14,11 @@ const handler = require('./api-handler').default; // Init app const app = new Koa(); -app.use(cors()); + +app.use(cors({ + origin: '*' +})); + app.use(bodyParser({ // リクエストが multipart/form-data でない限りはJSONだと見なす detectJSON: ctx => !ctx.is('multipart/form-data')