flight-redirect
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -73,3 +73,5 @@ 'use strict' | ||
} | ||
const info = this.checkAllowRouter(req.url) | ||
const info = this.checkAllowRouter(req.url.replace(/^\/+/, '')) | ||
// console.log(req.url, {info}) | ||
if(!info){ | ||
@@ -89,2 +91,3 @@ return | ||
if(state){ | ||
return res.redirect(302, url) | ||
@@ -91,0 +94,0 @@ } |
{ | ||
"name": "flight-redirect", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,2 +26,4 @@ 'use strict' | ||
const req = {url: 'domestic/list/NKG_BJS_SRT_1_0_0/?start=2018-07-05&back=2018-07-07'} | ||
// 2.3 | ||
// const req = {url: 'domestic/list/NKG_BJS_SRT_1_0_0/?start=2018-07-05&back=2018-07-07'} | ||
const res = {redirect(){ | ||
@@ -28,0 +30,0 @@ console.log(Array.prototype.slice.apply(arguments)) |
10417
237