@koa/router 9.4.0 → 10.0.0
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/lib/router.js +1 -1
- package/package.json +1 -1
package/lib/router.js
CHANGED
|
@@ -532,7 +532,7 @@ Router.prototype.redirect = function (source, destination, code) {
|
|
|
532
532
|
if (source[0] !== '/') source = this.url(source);
|
|
533
533
|
|
|
534
534
|
// lookup destination route by name
|
|
535
|
-
if (destination[0] !== '/') destination = this.url(destination);
|
|
535
|
+
if (destination[0] !== '/' && !destination.includes('://')) destination = this.url(destination);
|
|
536
536
|
|
|
537
537
|
return this.all(source, ctx => {
|
|
538
538
|
ctx.redirect(destination);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koa/router",
|
|
3
3
|
"description": "Router middleware for koa. Provides RESTful resource routing.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "10.0.0",
|
|
5
5
|
"author": "Alex Mingoia <talk@alexmingoia.com>",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/koajs/router/issues",
|