Properly direct as https
This commit is contained in:
parent
27a571328b
commit
1b255c9f56
|
@ -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)
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue