use pathname instead of req.url