logger$middleware should log request URL's conditionally. To achieve this behavior we can make our middleware function curried, where the last returned function should conform to
req.res.sendmethod which allows to send an HTTP response using the same common interface that we use for sending a response inside API Effects. The mentioned method returns an empty Observable (Observable that immediately completes) as a result, so it can be composed easily inside a middleware pipeline.
authorize$middleware can look like in the following snippet:
httpListener. In this case the middleware will operate on each request that goes through your HTTP server.