diff --git a/server/auth.coffee b/server/auth.coffee index 6708609..08066d3 100644 --- a/server/auth.coffee +++ b/server/auth.coffee @@ -54,7 +54,10 @@ exports.middleware = -> (req, res, next) -> nonce = new Date().getTime() + '' + new Date().getMilliseconds(); cookies.set("nonce", nonce) console.log(req.headers.host) - return_sso_url="http://" + req.headers.host + req.url + if req.headers.host is "91.121.152.74:8000" + return_sso_url="http://" + req.headers.host + req.url + else + return_sso_url="https://" + req.headers.host + req.url payload = "nonce=" + nonce + "&return_sso_url=" + return_sso_url base64payload = new Buffer(payload).toString('base64') urlencoded = encodeURIComponent(base64payload)