You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uuWAF/rules/force-https.lua

15 lines
254 B

--[[
规则名称: http重定向https
过滤阶段: 请求阶段
危险等级: 低危
规则描述: 将不安全的http请求重定向到https
--]]
if ngx.var.scheme == "http" then
return ngx.redirect("https://" .. ngx.var.host)
end
return false