Skip to content

Commit 1c2c512

Browse files
sokrasaifelse
authored andcommitted
cherry-pick: 33ebd1f, backward compatibility webpack#359
1 parent 5659fd9 commit 1c2c512

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,17 @@ function Server(compiler, options) {
142142
if(!Array.isArray(options.proxy)) {
143143
options.proxy = Object.keys(options.proxy).map(function (context) {
144144
var proxyOptions;
145+
var correctedContext = context.replace(/\/\*$/, "");
145146

146147
if(typeof options.proxy[context] === 'string') {
147148
proxyOptions = {
148-
context: context,
149+
context: correctedContext,
149150
target: options.proxy[target]
150151
};
151152
}
152153
else {
153154
proxyOptions = options.proxy[context];
154-
proxyOptions.context = context;
155+
proxyOptions.context = correctedContext;
155156
}
156157

157158
return proxyOptions;

0 commit comments

Comments
 (0)