Skip to content

Commit 1373587

Browse files
amasaddougwilson
authored andcommitted
docs: expand setHeaders documentation
closes #22
1 parent 61f5989 commit 1373587

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
7878

7979
##### setHeaders
8080

81-
Function to set custom headers on response.
81+
Function to set custom headers on response. Alterations to the headers need to
82+
occur synchronously. The function is called as `fn(res, path, stat)`, where
83+
the arguments are:
84+
85+
- `res` the response object
86+
- `path` the file path that is being sent
87+
- `stat` the stat object of the file that is being sent
8288

8389
## Examples
8490

0 commit comments

Comments
 (0)