Skip to content

Commit

Permalink
Merge pull request #51 from akalipetis/hotfix-enforce-https
Browse files Browse the repository at this point in the history
Fix enforce_https to not always be true
  • Loading branch information
akalipetis authored Sep 12, 2018
2 parents b2db065 + a2ddb37 commit 328c9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ceryx/nginx/lualib/router.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if is_not_https then
cache:set(host .. ":enforce_https", enforce_https, 5)
end

if enforce_https then
if enforce_https == 1 then
return ngx.redirect("https://" .. host .. ngx.var.request_uri, ngx.HTTP_MOVED_PERMANENTLY)
end
end
Expand Down

0 comments on commit 328c9c2

Please sign in to comment.