You could use resolvedUrl
field from the context object.
export async function getServerSideProps({ req, res, resolvedUrl }) {
// Will log a normalized version of the request URL including query strings
console.log(resolvedUrl)
// Remaining code
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…