From edd3e030f4da354fadaf0f8ec0b8416f526e6781 Mon Sep 17 00:00:00 2001 From: opi Date: Thu, 13 Nov 2014 20:27:01 +0100 Subject: [PATCH] [fix] Force portal scheme. Fix #25 --- access.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/access.lua b/access.lua index e659d5c..7dbd69b 100644 --- a/access.lua +++ b/access.lua @@ -687,6 +687,11 @@ if ngx.var.host == conf["portal_domain"] then if ngx.var.request_method == "GET" then + -- Force portal scheme + if ngx.var.scheme ~= conf["portal_scheme"] then + return redirect(portal_url) + end + -- http://mydomain.org/ssowat if ngx.var.uri.."/" == conf["portal_path"] then return redirect(portal_url)