diff --git a/lib/controller/MockController.js b/lib/controller/MockController.js index fda1f05..0eff6c9 100644 --- a/lib/controller/MockController.js +++ b/lib/controller/MockController.js @@ -89,7 +89,7 @@ MockController.prototype = extend(MockController.prototype, { * @private */ _acceptMiddleware: function (serverOptions, responseOptions) { - var endPointId = responseOptions.dir.replace(serverOptions.dirName, '').replace(/\/$/, ''); + var endPointId = responseOptions.dir.replace(serverOptions.dirName, '').replace(/\/$/, '').replace('\\', '/'); var middleware = serverOptions.middleware; if (!endPointId || !middleware || typeof middleware[endPointId] !== 'function') {