update ways to get req.pathname