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:
36 files changed
+563
-169
No files matched your search
@@ -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"))
|
||||
|
||||
Reference in new issue
Block a user