Skip to content

Commit

Permalink
[fix] Fix mutation of global headers by using Object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
急須 committed Jun 21, 2018
1 parent 5bd72f5 commit db548a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/controller/MockController.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ MockController.prototype = extend(MockController.prototype, {

var path = this._getPath(req.originalUrl, this.options.urlPath, this.options.restPath);
var responseHeaders;
var headers = this.options.headers || {};
var headers = Object.assign({}, this.options.headers);
var options;

if (path.search('favicon.ico') >= 0) {
Expand Down

0 comments on commit db548a3

Please sign in to comment.