docs: def secure(view_func):
      """Handles SSL redirect on the view level."""
  
      @wraps(view_func, assigned=available_attrs(view_func))
      def _wrapped_view(request, *args, **kwargs):
          if not request.is_secure():
              redirect = _redirect(request, True)
              if redirect:
                  # Redirect might be None if SSL is not enabled
                  return redirect
          return view_func(request, *args, **kwargs)
      return _wrapped_view