Ring middleware for managing HTTPS requests