From 1b255c9f5684781ed922a7b636116658b2ca78df Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 23 May 2016 15:51:04 +0200 Subject: [PATCH] Properly direct as https --- server/auth.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)