mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Match content-type of incoming request. Fix for Alexa.
This commit is contained in:
@ -50,6 +50,10 @@ func makeRequestHandler(config *WatchdogConfig) func(http.ResponseWriter, *http.
|
||||
os.Stdout.Write(out)
|
||||
}
|
||||
|
||||
// Match header for strict services
|
||||
if r.Header.Get("Content-Type") == "application/json" {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
}
|
||||
w.WriteHeader(200)
|
||||
w.Write(out)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user