gulp-webserver
gulp-webserver copied to clipboard
PATCH request are rejected by the serve index middleware
Moving the code
// Proxy requests
for (var i = 0, len = config.proxies.length; i < len; i++) {
var proxyoptions = url.parse(config.proxies[i].target);
if (config.proxies[i].hasOwnProperty('options')) {
extend(proxyoptions, config.proxies[i].options);
}
app.use(config.proxies[i].source, proxy(proxyoptions));
}
before
if (config.directoryListing.enable) {
app.use(serveIndex(path.resolve(config.directoryListing.path), config.directoryListing.options));
}
solves the problem.
Thanks @hadrienk. Could you open a PR with your changes?