We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4526939 + 269f57d commit d739bb3Copy full SHA for d739bb3
lib/serve.js
@@ -45,7 +45,10 @@ function promiseCallback(promise, callback) {
45
46
function createHandler(dir) {
47
return function(request, response) {
48
- var func = request.path.split("/").filter(function(e) {
+ // handle proxies without path re-writes (http-servr)
49
+ var cleanPath = request.path.replace(/^\/.netlify\/functions/, '')
50
+
51
+ var func = cleanPath.split("/").filter(function(e) {
52
return e;
53
})[0];
54
var module = path.join(process.cwd(), dir, func);
0 commit comments