mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Use wildcard
This commit is contained in:
parent
d310a7b8a5
commit
3b7939d288
1 changed files with 5 additions and 1 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue