Skip to content

Commit

Permalink
[fix]set headers;
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyLover committed May 15, 2019
1 parent a961928 commit 3cec21b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/server/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const mockMiddleware = async (ctx, next) => {
ctx.body = typeof data === 'string' ? data : JSON.stringify(data);
ctx.status = status;
for (const key in header) {
ctx.set({ key: header[key] });
ctx.set(key, header[key]);
}

if (delay) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mock-server-local",
"version": "1.8.7",
"version": "1.8.8",
"description": "Mock your apis with a node server",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit 3cec21b

Please sign in to comment.