1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-28 14:58:24 +09:00

Use wildcard

This commit is contained in:
syuilo 2018-06-17 11:27:20 +09:00
parent 2fcebdd281
commit 750c0d7df2

View File

@ -14,7 +14,11 @@ const handler = require('./api-handler').default;
// Init app // Init app
const app = new Koa(); const app = new Koa();
app.use(cors());
app.use(cors({
origin: '*'
}));
app.use(bodyParser({ app.use(bodyParser({
// リクエストが multipart/form-data でない限りはJSONだと見なす // リクエストが multipart/form-data でない限りはJSONだと見なす
detectJSON: ctx => !ctx.is('multipart/form-data') detectJSON: ctx => !ctx.is('multipart/form-data')