Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

Commit 70701da

Browse files
pmundtalexellis
authored andcommitted
Include Host string in Request
The Host string provides us with a mechanism for extracting the function name, which we, in turn, require for things like function-level access control with OPA. In Docker Swarm, in particular, the HOSTNAME environment variable (or manual parsing from /etc/hostname) is insufficient for extracting the function name, as this simply maps to the container ID. Resolves #2. Signed-off-by: Paul Mundt <paul.mundt@adaptant.io>
1 parent b0d5269 commit 70701da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type Request struct {
2323
Header http.Header
2424
QueryString string
2525
Method string
26+
Host string
2627
}
2728

2829
// FunctionHandler used for a serverless Go method invocation

0 commit comments

Comments
 (0)