chanjs 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,7 +74,8 @@ Chan.js 基于express 纯js研发的轻量级mvc框架。基于函数式编程
74
74
 
75
75
  * 配置文件
76
76
  * 多模块mvc
77
- * 多插件mvc
77
+ * 插件mvc
78
+ * 支持cors跨域配置
78
79
  * mysql数据库支持
79
80
  * 路由控制
80
81
  * art-template模板
package/core/chan.js CHANGED
@@ -116,7 +116,7 @@ class Chan {
116
116
 
117
117
  //解决跨域
118
118
  loadCors(){
119
- Chan.config?.cors?.origin && this.app.use(cors());
119
+ Chan.config?.cors && this.app.use(cors(Chan.config.cors));
120
120
  }
121
121
 
122
122
  // 加载插件
@@ -28,9 +28,6 @@ let config = {
28
28
  password: "123456",
29
29
  database: "chanyue",
30
30
  charset: "utf8mb4",
31
- },
32
- cors:{
33
- origin: '*'
34
31
  }
35
32
  }
36
33
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chanjs",
3
- "version": "1.0.14",
4
- "description": "Chanjs develops a lightweight MVC framework based on express pure JavaScript",
3
+ "version": "1.0.16",
4
+ "description": "Chan.js基于express 纯js研发的轻量级mvc框架。",
5
5
  "main": "core/chan.js",
6
6
  "module": "core/chan.js",
7
7
  "keywords": [