mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Disable envAsHeader by default (#435)
* disable envAsHeader by default * fix -e flag usage description
This commit is contained in:
@@ -237,7 +237,9 @@ func callfn(u string, content io.Reader, output io.Writer, env []string) error {
|
|||||||
|
|
||||||
req.Header.Set("Content-Type", "application/json")
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
envAsHeader(req, env)
|
if len(env) > 0 {
|
||||||
|
envAsHeader(req, env)
|
||||||
|
}
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := http.DefaultClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func runflags() []cli.Flag {
|
|||||||
return []cli.Flag{
|
return []cli.Flag{
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "e",
|
Name: "e",
|
||||||
Usage: "limit the environment variables sent to function, if ommited then all are sent.",
|
Usage: "select environment variables to be sent to function",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user