whistle.mock-plugins 1.0.6-beta.2 → 1.0.6-beta.4

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.
@@ -232,11 +232,8 @@ const ruleManager = {
232
232
  this.log(`[规则处理器] 处理请求,接口: ${interfaceObj.name}, 代理类型: ${proxyType}`);
233
233
 
234
234
  // 添加CORS支持 - 设置跨域相关的响应头
235
- res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
236
- res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS, PATCH');
237
- res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With, Accept');
235
+ res.setHeader('Access-Control-Allow-Origin', '*');
238
236
  res.setHeader('Access-Control-Allow-Credentials', 'true');
239
- res.setHeader('Access-Control-Max-Age', '86400'); // 24小时
240
237
 
241
238
  // 处理预检请求
242
239
  if (req.method === 'OPTIONS') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.mock-plugins",
3
- "version": "1.0.6-beta.2",
3
+ "version": "1.0.6-beta.4",
4
4
  "description": "Whistle 插件,用于快速创建 API 模拟数据",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {