Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Fix incorrect example in headers and rewrites docs (vercel#27652)
Browse files Browse the repository at this point in the history
x-ref: vercel#22660 (comment)

## Documentation / Examples

- [x] Make sure the linting passes
  • Loading branch information
ijjk authored Jul 31, 2021
1 parent ed17f2d commit fb8ce0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions docs/api-reference/next.config.js/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,17 @@ The following characters `(`, `)`, `{`, `}`, `:`, `*`, `+`, `?` are used for reg

```js
module.exports = {
async redirects() {
async headers() {
return [
{
// this will match `/english(default)/something` being requested
source: '/english\\(default\\)/:slug',
destination: '/en-us/:slug',
permanent: false,
headers: [
{
key: 'x-header',
value: 'value',
},
],
},
]
},
Expand Down
3 changes: 1 addition & 2 deletions docs/api-reference/next.config.js/rewrites.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,12 @@ The following characters `(`, `)`, `{`, `}`, `:`, `*`, `+`, `?` are used for reg

```js
module.exports = {
async redirects() {
async rewrites() {
return [
{
// this will match `/english(default)/something` being requested
source: '/english\\(default\\)/:slug',
destination: '/en-us/:slug',
permanent: false,
},
]
},
Expand Down

0 comments on commit fb8ce0a

Please sign in to comment.