Add Rails Middleware