File tree Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Original file line number Diff line number Diff 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`
7474Default: ` undefined `
7575
7676This 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
103139Type: ` Boolean|String `
You can’t perform that action at this time.
0 commit comments