Use function
Implement middleware for redirecting non-HTTPS requests
Allow toggling HTTPS enforcement
Return unaltered handler if disabled
Apply middleware
Merge branch 'enforce-https'