feature: Add client ip to inbound request information (#1678)

* feature: Add client ip to inbound request information
* feature (workers): Add the user's client IP to a session's connection information (#1749)
This commit is contained in:
Jim authored and GitHub committed 2021-12-09 20:41:08 -05:00
1 parent 2cfa027406
commit baa1d88f1f
36 files changed
+563 -169

No files matched your search

+2 -1
View File
@@ -67,7 +67,7 @@ func (c *Controller) handler(props HandlerProperties) (http.Handler, error) {
commonWrappedHandler := wrapHandlerWithCommonFuncs(corsWrappedHandler, c, props)
callbackInterceptingHandler := wrapHandlerWithCallbackInterceptor(commonWrappedHandler, c)
printablePathCheckHandler := cleanhttp.PrintablePathCheckHandler(callbackInterceptingHandler, nil)
eventsHandler, err := common.WrapWithEventsHandler(printablePathCheckHandler, c.conf.Eventer, c.kms)
eventsHandler, err := common.WrapWithEventsHandler(printablePathCheckHandler, c.conf.Eventer, c.kms, props.ListenerConfig)
if err != nil {
return nil, err
}
@@ -292,6 +292,7 @@ func wrapHandlerWithCommonFuncs(h http.Handler, c *Controller, props HandlerProp
// piggyback some eventing fields with the auth info proto message
requestInfo.EventId = info.EventId
requestInfo.TraceId = info.Id
requestInfo.ClientIp = info.ClientIp
} else {
w.WriteHeader(http.StatusInternalServerError)
event.WriteError(ctx, op, errors.New("unable to read event request info from context"))