[fix] Pass the pathname instead of the full URL