Removes FN_PARAM_xxx (#661)

This commit is contained in:
Travis Reeder
2018-01-09 08:42:25 -08:00
committed by Owen Cliffe
parent 66cdd2aca5
commit 580dd3e5cb
3 changed files with 0 additions and 11 deletions

View File

@@ -178,11 +178,6 @@ func TestCallConfigurationRequest(t *testing.T) {
expectedEnv["FN_METHOD"] = method expectedEnv["FN_METHOD"] = method
expectedEnv["FN_REQUEST_URL"] = url expectedEnv["FN_REQUEST_URL"] = url
// add expected parameters from URL
for _, val := range params {
expectedEnv[fmt.Sprintf("FN_PARAM_%s", val.Key)] = val.Value
}
// do this before the "real" headers get sucked in cuz they are formatted differently // do this before the "real" headers get sucked in cuz they are formatted differently
expectedHeaders := make(http.Header) expectedHeaders := make(http.Header)
for k, v := range expectedEnv { for k, v := range expectedEnv {

View File

@@ -113,11 +113,6 @@ func FromRequest(appName, path string, req *http.Request, params Params) CallOpt
envVars["FN_METHOD"] = req.Method envVars["FN_METHOD"] = req.Method
envVars["FN_REQUEST_URL"] = url envVars["FN_REQUEST_URL"] = url
// params
for _, param := range params {
envVars[toEnvName("FN_PARAM", param.Key)] = param.Value
}
headerVars := make(map[string]string, len(req.Header)) headerVars := make(map[string]string, len(req.Header))
for k, v := range req.Header { for k, v := range req.Header {

View File

@@ -41,7 +41,6 @@ You will also have access to a set of environment variables.
* `FN_HEADER_$X` - the HTTP headers that were set for this request. Replace $X with the upper cased name of the header and replace dashes in the header with underscores. * `FN_HEADER_$X` - the HTTP headers that were set for this request. Replace $X with the upper cased name of the header and replace dashes in the header with underscores.
* `$X` - any [configuration values](https://github.com/fnproject/cli/blob/master/README.md#application-level-configuration) you've set * `$X` - any [configuration values](https://github.com/fnproject/cli/blob/master/README.md#application-level-configuration) you've set
for the Application or the Route. Replace X with the upper cased name of the config variable you set. Ex: `minio_secret=secret` will be exposed via MINIO_SECRET env var. for the Application or the Route. Replace X with the upper cased name of the config variable you set. Ex: `minio_secret=secret` will be exposed via MINIO_SECRET env var.
* `FN_PARAM_$Y` - any variables found from parsing the URL. Replace $Y with any `:var` from the url.
Warning: these may change before release. Warning: these may change before release.