waibu 1.1.19 → 1.1.20
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 +1 -1
- package/plugin/factory.js +1 -0
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -273,6 +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
277
|
info.qs = defaultsDeep({}, query, info.qs)
|
|
277
278
|
if (!isEmpty(info.qs)) url += '?' + this.qs.stringify(info.qs)
|
|
278
279
|
if (!url.startsWith('http') && guessHost) url = `http://${this.config.server.host}:${this.config.server.port}/${trimStart(url, '/')}`
|