Extra middlewares and utilities for Hack2