Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 306 Bytes

http_to_https_redirect.md

File metadata and controls

9 lines (7 loc) · 306 Bytes

HTTP to HTTPS Port Redirect

When the port does not equal 443, then redirect the client to the HTTPS url. This could be used when you want to force all traffic to a specific port.

if avi.vs.port() ~= "443" then
  avi.http.redirect("https://" .. avi.http.hostname() .. avi.http.get_uri())
end