mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 04:26:35 +00:00
Fix issue with direct_functions and path behaviour
- The path clipping / transforming behaviour must be turned-off when we are not using direct_functions as is used in faas-nomad and faas-ecs. This will need a change in each provider to strip paths, but fixes a 404 error these users will see if they upgrade to 0.9.2 or newer. 0.9.3 will have a this fix meaning the whole un-edited path is passed to the provider when direct_functions is set to false. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -100,6 +101,10 @@ func forwardRequest(w http.ResponseWriter, r *http.Request, proxyClient *http.Cl
|
||||
defer upstreamReq.Body.Close()
|
||||
}
|
||||
|
||||
if _, exists := os.LookupEnv("write_request_uri"); exists {
|
||||
log.Printf("forwardRequest: %s %s\n", upstreamReq.Host, upstreamReq.URL.String())
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
|
Reference in New Issue
Block a user