Files
JJ KasperandGitHub 607ff2b322 Update to process redirects/rewrites for _next/data with middleware (#37574)
* Update to process redirects/rewrites for _next/data

* correct matched-path resolving with middleware

* Add next-data header

* migrate middleware tests

* lint-fix

* update error case

* update test case

* Handle additional resolving cases and add more tests

* update test from merge

* fix test

* rm .only

* apply changes from review

* ensure _next/data resolving does not apply without middleware
2022-06-10 12:35:12 -05:00

13 lines
286 B
JavaScript

export default function ClearQueryParams(props) {
return <pre id="my-query-params">{JSON.stringify(props.query)}</pre>
}
/** @type {import('next').GetServerSideProps} */
export const getServerSideProps = (req) => {
return {
props: {
query: { ...req.query },
},
}
}