From bf8d5a3a473cdf512ea2ae5f59356cb1ebcb6975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=BE=99=E8=BE=89?= <540886643@qq.com> Date: Tue, 25 Jun 2019 23:24:47 +0800 Subject: [PATCH] [fix]router.all for -api request; --- .gitignore | 1 + lib/server/local.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5276f53..7705d2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # dev data fe/mock/** fe/dist +docs/mock/_checked.js # IDE .vscode diff --git a/lib/server/local.js b/lib/server/local.js index 448fa22..fe53cc9 100644 --- a/lib/server/local.js +++ b/lib/server/local.js @@ -114,7 +114,7 @@ router msg: 'ok' }; }) - .get('/$mock-api', async (ctx, next) => { + .all('/$mock-api', async (ctx, next) => { if (!isFromLocalIp(ctx)) { return next(); } diff --git a/package.json b/package.json index fb1fb95..029bde1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mock-server-local", - "version": "2.4.2", + "version": "2.5.0", "description": "Mock your apis with a node server", "main": "index.js", "bin": {