@nuxt/server
Advanced tools
Comparing version 2.14.9 to 2.14.10
/*! | ||
* @nuxt/server v2.14.9 (c) 2016-2020 | ||
* @nuxt/server v2.14.10 (c) 2016-2020 | ||
@@ -742,8 +742,12 @@ * - All the amazing contributors | ||
// DX: redirect if router.base in development | ||
if (this.options.dev && this.nuxt.options.router.base !== '/') { | ||
const routerBase = this.nuxt.options.router.base; | ||
if (this.options.dev && routerBase !== '/') { | ||
this.useMiddleware({ | ||
prefix: false, | ||
handler: (req, res) => { | ||
const to = utils.urlJoin(this.nuxt.options.router.base, req.url); | ||
consola__default['default'].info(`[Development] Redirecting from \`${decodeURI(req.url)}\` to \`${decodeURI(to)}\` (router.base specified).`); | ||
handler: (req, res, next) => { | ||
if (decodeURI(req.url).startsWith(decodeURI(routerBase))) { | ||
return next() | ||
} | ||
const to = utils.urlJoin(routerBase, req.url); | ||
consola__default['default'].info(`[Development] Redirecting from \`${decodeURI(req.url)}\` to \`${decodeURI(to)}\` (router.base specified)`); | ||
res.writeHead(302, { | ||
@@ -750,0 +754,0 @@ Location: to |
{ | ||
"name": "@nuxt/server", | ||
"version": "2.14.9", | ||
"version": "2.14.10", | ||
"repository": "nuxt/nuxt.js", | ||
@@ -11,5 +11,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@nuxt/config": "2.14.9", | ||
"@nuxt/utils": "2.14.9", | ||
"@nuxt/vue-renderer": "2.14.9", | ||
"@nuxt/config": "2.14.10", | ||
"@nuxt/utils": "2.14.10", | ||
"@nuxt/vue-renderer": "2.14.10", | ||
"@nuxtjs/youch": "^4.2.3", | ||
@@ -16,0 +16,0 @@ "chalk": "^3.0.0", |
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
30266
825
+ Added@nuxt/config@2.14.10(transitive)
+ Added@nuxt/ufo@0.0.3(transitive)
+ Added@nuxt/utils@2.14.10(transitive)
+ Added@nuxt/vue-renderer@2.14.10(transitive)
- Removed@nuxt/config@2.14.9(transitive)
- Removed@nuxt/utils@2.14.9(transitive)
- Removed@nuxt/vue-renderer@2.14.9(transitive)
Updated@nuxt/config@2.14.10
Updated@nuxt/utils@2.14.10
Updated@nuxt/vue-renderer@2.14.10