Swapped external middleware for custom alternative.