waibu 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/factory.js CHANGED
@@ -273,7 +273,7 @@ async function factory (pkgName) {
273
273
  let url = info.path
274
274
  const langDetector = get(cfg, 'intl.detectors', [])
275
275
  if (info.ns) url = trimEnd(langDetector.includes('path') ? `/${params.lang ?? ''}${this.routeDir(info.ns)}${info.path}` : `${this.routeDir(info.ns)}${info.path}`, '/')
276
- url = url.split('/').map(u => encodeURI(u)).join('/')
276
+ if (options.uriEncoded) url = url.split('/').map(u => encodeURI(u)).join('/')
277
277
  info.qs = defaultsDeep({}, query, info.qs)
278
278
  if (!isEmpty(info.qs)) url += '?' + this.qs.stringify(info.qs)
279
279
  if (!url.startsWith('http') && guessHost) url = `http://${this.config.server.host}:${this.config.server.port}/${trimStart(url, '/')}`