This arrangement would allow any page file to call the middleboxes, by inserting the require() (without the if test) in the desired location.