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
70
70
71
71
### headers
72
72
73
- Type: ` Object|Function `
73
+ Type: ` Array| Object|Function`
74
74
Default: ` undefined `
75
75
76
76
This property allows a user to pass custom HTTP headers on each request.
@@ -98,6 +98,42 @@ webpackDevMiddleware(compiler, {
98
98
});
99
99
```
100
100
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
+
101
137
### index
102
138
103
139
Type: ` Boolean|String `
You can’t perform that action at this time.
0 commit comments