Use req.path in history-support middleware