Skip to content

Commit f483475

Browse files
committed
docs: update
1 parent cd1cb12 commit f483475

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ This property allows a user to pass the list of HTTP request methods accepted by
7070

7171
### headers
7272

73-
Type: `Object|Function`
73+
Type: `Array|Object|Function`
7474
Default: `undefined`
7575

7676
This property allows a user to pass custom HTTP headers on each request.
@@ -98,6 +98,42 @@ webpackDevMiddleware(compiler, {
9898
});
9999
```
100100

101+
or
102+
103+
```js
104+
webpackDevMiddleware(compiler, {
105+
headers: [
106+
{
107+
key: "X-custom-header"
108+
value: "foo"
109+
},
110+
{
111+
key: "Y-custom-header",
112+
value: "bar"
113+
}
114+
]
115+
},
116+
});
117+
```
118+
119+
or
120+
121+
```js
122+
webpackDevMiddleware(compiler, {
123+
headers: () => [
124+
{
125+
key: "X-custom-header"
126+
value: "foo"
127+
},
128+
{
129+
key: "Y-custom-header",
130+
value: "bar"
131+
}
132+
]
133+
},
134+
});
135+
```
136+
101137
### index
102138

103139
Type: `Boolean|String`

0 commit comments

Comments
 (0)