diff --git a/docs/Hook-Definition.md b/docs/Hook-Definition.md index 9939ba4..14c17f6 100644 --- a/docs/Hook-Definition.md +++ b/docs/Hook-Definition.md @@ -26,7 +26,7 @@ Hooks are defined as JSON objects. Please note that in order to be considered va * `method` - HTTP(s) method used by the client (i.e. GET, POST, etc...) * `URI` - URI which client requested * `host` - value of the `Host` header sent by the client - * `remoteAddress` - client's IP address + * `remoteAddr` - client's IP address and port in the `IP:PORT` format * `query` - object with query parameters and their respective values * `headers` - object with headers and their respective values * `base64EncodedBody` - base64 encoded request body diff --git a/hook/hook.go b/hook/hook.go index 7fdf8ef..d8711b3 100644 --- a/hook/hook.go +++ b/hook/hook.go @@ -430,7 +430,7 @@ type PreHookContext struct { HookID string `json:"hookID"` Method string `json:"method"` Base64EncodedBody string `json:"base64EncodedBody"` - RemoteAddress string `json:"remoteAddress"` + RemoteAddr string `json:"remoteAddr"` URI string `json:"URI"` Host string `json:"host"` Headers http.Header `json:"headers"` diff --git a/webhook.go b/webhook.go index 3ce52dd..467c784 100644 --- a/webhook.go +++ b/webhook.go @@ -256,7 +256,7 @@ func hookHandler(w http.ResponseWriter, r *http.Request) { HookID: matchedHook.ID, Method: r.Method, Base64EncodedBody: base64.StdEncoding.EncodeToString(body), - RemoteAddress: r.RemoteAddr, + RemoteAddr: r.RemoteAddr, URI: r.RequestURI, Host: r.Host, Headers: r.Header,