优化cors,更好的支持RESFULAPI
parent
70a2df5583
commit
1d4940b903
|
@ -31,6 +31,7 @@ export default function(req, res, next) {
|
|||
}
|
||||
|
||||
res.set('Access-Control-Allow-Origin', `${protocol}//${host}`)
|
||||
res.set('Access-Control-Allow-Methods', 'GET,HEAD,POST,PUT,DELETE,PATCH')
|
||||
|
||||
if (headers) {
|
||||
res.set('Access-Control-Allow-Headers', headers)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@gm5/core",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"type": "module",
|
||||
"description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手",
|
||||
"author": "yutent <yutent.io@gmail.com>",
|
||||
|
|
Loading…
Reference in New Issue