-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporary: SPR: Use Group Index Mapping (#9089)
This pull request is a temporary addition that uses the `x-now-route-params` header in serverless. This header returns the regex groups with indexes, not their named variants. As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected names. Since this got complex, I've added a test for it. We should probably remove this behavior sooner than later.
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const SlugPage = ({ query }) => <div>{JSON.stringify(query)}</div> | ||
|
||
SlugPage.getInitialProps = ({ query }) => ({ query }) | ||
|
||
export default SlugPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters