diff --git a/access.lua b/access.lua index 1dd9b0f..b88b288 100644 --- a/access.lua +++ b/access.lua @@ -69,12 +69,6 @@ then -- `GET` method will serve a portal file if ngx.var.request_method == "GET" then - -- Force portal scheme - if ngx.var.scheme ~= conf["portal_scheme"] then - ngx.log(ngx.DEBUG, "REDIRECT SCHEME ~= PORTAL_SCHEME: "..ngx.var.scheme) - return hlp.redirect(conf.portal_url) - end - -- Add a trailing `/` if not present if ngx.var.uri.."/" == conf["portal_path"] then ngx.log(ngx.DEBUG, "REDIRECT MISSING /") diff --git a/helpers.lua b/helpers.lua index 6981a7a..9afa349 100644 --- a/helpers.lua +++ b/helpers.lua @@ -324,13 +324,6 @@ end -- Set the authentication headers in order to pass credentials to the -- application underneath. function set_headers(user) - - -- We definitely don't want to pass credentials on a non-encrypted - -- connection. - if ngx.var.scheme ~= "https" then - return redirect("https://"..ngx.var.host..ngx.var.uri..uri_args_string()) - end - local user = user or authUser -- If the password is not in cache or if the cache has expired, ask for