diff --git a/package.json b/package.json index 0ae1efe..752d98e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-swagger", - "version": "0.1.6", + "version": "0.1.7", "description": "A set of tools for generating Swagger API documentation based on the HTTP nodes deployed in a flow", "license": "Apache", "repository": { diff --git a/swagger/swagger.js b/swagger/swagger.js index 5f30bd0..924c3df 100644 --- a/swagger/swagger.js +++ b/swagger/swagger.js @@ -163,13 +163,13 @@ module.exports = function(RED) { RED.httpAdmin.get('/swagger-ui/reqs/i18next.min.js', function(req, res){ var basePath = require.resolve('i18next-client'); - basePath = basePath.replace(/\/i18next.js$/,""); + basePath = basePath.replace(/[\\\/]i18next.js$/,""); var filename = path.join(basePath,'i18next.min.js'); sendFile(res,filename); }); RED.httpAdmin.get('/swagger-ui/reqs/*', function(req, res){ var basePath = require.resolve('swagger-ui'); - basePath = basePath.replace(/\/swagger-ui.js$/,""); + basePath = basePath.replace(/[\\\/]swagger-ui.js$/,""); var filename = path.join(basePath, req.params[0]); sendFile(res,filename); });