gulp-webserver icon indicating copy to clipboard operation
gulp-webserver copied to clipboard

PATCH request are rejected by the serve index middleware

Open hadrienk opened this issue 10 years ago • 1 comments

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.

hadrienk avatar Nov 21 '14 16:11 hadrienk

Thanks @hadrienk. Could you open a PR with your changes?

schickling avatar Nov 21 '14 17:11 schickling