I always find this kind of nesting confusing, not sure if it makes a lot of sense but maybe you could consider two options:

first, use return statements, e.g.
```ruby
 # check for ssl connection
  if SETTINGS[:require_ssl] and !request.ssl?
    logger.error "SSL is required - rejecting request from #{request.ip}"
    return false
  end
```

secondly, you could consider breaking it to a smaller methods?