5 Commits

Author SHA1 Message Date
Thomas E Lackey
decf9addb3 Make 'URLPathTransformer' interface and implementation to do the function prefix trimming instead of baking it in. Also add a configuration option, 'pass_url_path_to_functions' to control whether the full path is passed to the functions or not.
Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Thomas E Lackey
7870b87c38 Implement proposal 716, passing full paths through the Gateway and fwatchdog.
Previously, only the query string of the URL was passed through the Gateway.
With this change, the entire path requested by the client is passed through as well as the query string.

While fwatchdog already supported passing the path through, in practice this would not happen
since the Gateway would have swallowed it before forwarding the request to the watchdog.

With this change, the path portion after the function name is added to the Http_Path environment
variable, provided that cgiHeaders are enabled.  This is similar to the of-watchdog equivalent.

Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
2018-08-29 12:41:04 +01:00
Dmitri Rubinstein
fd0abe46dd Propagate Host header from gateway request to the function.
Host HTTP header was not propagated to the function because it is not
a part of http.Request.Header map.

Signed-off-by: Dmitri Rubinstein <dmitri.rubinstein@googlemail.com>
2018-08-16 16:20:28 +01:00
Lucas Roesler
6676d1b807 Trim tailing slash from service name before proxy
**What**
- When determining the service name of the function, remove any trailing
slashes, the slashes are not allowed in service names for either Swarm
or K8S, so this can only be a left over from the url path

**Why**
- This was preventing service resolution, and hence failed functions,
    when the function was called with a trailing slash

Fixes #714

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-06-16 16:05:09 -07:00
Alex Ellis (VMware)
58bd87c811 Update proxy to pass query-string
HTTP proxy was not passing query-string upstream. This change
reinstates the behaviour through TDD - adding test coverage and
automated regression testing.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-27 19:33:43 +01:00