diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-17 11:27:20 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-17 11:27:20 +0900 |
| commit | 750c0d7df27eeab4caf0133cd3ba338940828533 (patch) | |
| tree | 8596ac174a6b4a441052f2034047a6fa1fd5f902 /src/server | |
| parent | cors (diff) | |
| download | sharkey-750c0d7df27eeab4caf0133cd3ba338940828533.tar.gz sharkey-750c0d7df27eeab4caf0133cd3ba338940828533.tar.bz2 sharkey-750c0d7df27eeab4caf0133cd3ba338940828533.zip | |
Use wildcard
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/api/index.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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') |