swagger-ui-express
Advanced tools
Comparing version 4.4.0 to 4.5.0
@@ -201,5 +201,5 @@ 'use strict' | ||
function swaggerInitFn(req, res, next) { | ||
if (trimQuery(req.url) === '/package.json') { | ||
if (trimQuery(req.url).endsWith('/package.json')) { | ||
res.sendStatus(404) | ||
} else if (trimQuery(req.url) === '/swagger-ui-init.js') { | ||
} else if (trimQuery(req.url).endsWith('/swagger-ui-init.js')) { | ||
res.set('Content-Type', 'application/javascript') | ||
@@ -215,5 +215,5 @@ res.send(swaggerInit) | ||
return function (req, res, next) { | ||
if (trimQuery(req.url) === '/package.json') { | ||
if (trimQuery(req.url).endsWith('/package.json')) { | ||
res.sendStatus(404) | ||
} else if (trimQuery(req.url) === '/swagger-ui-init.js') { | ||
} else if (trimQuery(req.url).endsWith('/swagger-ui-init.js')) { | ||
if (req.swaggerDoc) { | ||
@@ -220,0 +220,0 @@ swaggerInitFile = jsTplString.toString().replace('<% swaggerOptions %>', stringify(opts)) |
{ | ||
"name": "swagger-ui-express", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"description": "Swagger UI Express", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20929