From 9450a898202f7e94b8e99006aa4889478213393d Mon Sep 17 00:00:00 2001 From: LiJohnson <598420668@163.com> Date: Thu, 3 Aug 2017 18:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9renew=E5=8F=82=E6=95=B0=20cas?= =?UTF-8?q?4.x=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a09fe0c..faacfd3 100644 --- a/index.js +++ b/index.js @@ -249,10 +249,12 @@ CASAuthentication.prototype._login = function(req, res, next) { // Set up the query parameters. var query = { - service: this.service_url + url.parse(req.url).pathname, - renew: this.renew + service: this.service_url + url.parse(req.url).pathname }; + if( this.renew ) query.renew = this.renew; + + // Redirect to the CAS login. res.redirect( this.cas_url + url.format({ pathname: '/login',