export default authMiddleware({ publicRoutes : ['/','/account','/contact','/order','/product/:category(.*)'] });
Adding :category(.*) will handle dynamic segment case.
:category(.*)