Skip to content

Commit eba64c2

Browse files
authoredJan 25, 2022
Clarify headers config option description (#33484)
Reading over this page, it wasn't immediately clear to me if these were headers which would get read off of the incoming request, or headers to be added to the outgoing response. ## Documentation / Examples - [X] Make sure the linting passes by running `yarn lint`
1 parent f60a480 commit eba64c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎docs/api-reference/next.config.js/headers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: Add custom HTTP headers to your Next.js app.
2121

2222
</details>
2323

24-
Headers allow you to set custom HTTP headers for an incoming request path.
24+
Headers allow you to set custom HTTP headers on the response to an incoming request on a given path.
2525

2626
To set custom HTTP headers you can use the `headers` key in `next.config.js`:
2727

@@ -50,7 +50,7 @@ module.exports = {
5050
`headers` is an async function that expects an array to be returned holding objects with `source` and `headers` properties:
5151

5252
- `source` is the incoming request path pattern.
53-
- `headers` is an array of header objects with the `key` and `value` properties.
53+
- `headers` is an array of response header objects, with `key` and `value` properties.
5454
- `basePath`: `false` or `undefined` - if false the basePath won't be included when matching, can be used for external rewrites only.
5555
- `locale`: `false` or `undefined` - whether the locale should not be included when matching.
5656
- `has` is an array of [has objects](#header-cookie-and-query-matching) with the `type`, `key` and `value` properties.

0 commit comments

Comments
 (0)
Please sign in to comment.