Fixes #5978: Adds plugin hook to allow certain URLs during maintenance mode