Skip to content

Commit db548a3

Browse files
author
急須
committed
[fix] Fix mutation of global headers by using Object.assign
1 parent 5bd72f5 commit db548a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/controller/MockController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ MockController.prototype = extend(MockController.prototype, {
174174

175175
var path = this._getPath(req.originalUrl, this.options.urlPath, this.options.restPath);
176176
var responseHeaders;
177-
var headers = this.options.headers || {};
177+
var headers = Object.assign({}, this.options.headers);
178178
var options;
179179

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

0 commit comments

Comments
 (0)