Using a local middleware