Middleware that allows for site-wide URL-based access control