It could be but it's not worth putting another piece of middleware in the pipeline for this. That's how I started then I just changed it to a function call.