Pass remote address in WebSocketMessageHasBeenPosted plugin hook (#27332)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d2c3710265
Коммит
4b0ae20ef7
@@ -44,12 +44,14 @@ func connectWebSocket(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
// We initialize webconn with all the necessary data.
|
||||
// If the queues are empty, they are initialized in the constructor.
|
||||
cfg := &platform.WebConnConfig{
|
||||
WebSocket: ws,
|
||||
Session: *c.AppContext.Session(),
|
||||
TFunc: c.AppContext.T,
|
||||
Locale: "",
|
||||
Active: true,
|
||||
PostedAck: r.URL.Query().Get(postedAckParam) == "true",
|
||||
WebSocket: ws,
|
||||
Session: *c.AppContext.Session(),
|
||||
TFunc: c.AppContext.T,
|
||||
Locale: "",
|
||||
Active: true,
|
||||
PostedAck: r.URL.Query().Get(postedAckParam) == "true",
|
||||
RemoteAddress: c.AppContext.IPAddress(),
|
||||
XForwardedFor: c.AppContext.XForwardedFor(),
|
||||
}
|
||||
// The WebSocket upgrade request coming from mobile is missing the
|
||||
// user agent so we need to fallback on the session's metadata.
|
||||
|
||||
Ссылка в новой задаче
Block a user