Software /
code /
prosody
Comparison
plugins/mod_http.lua @ 8596:71da54c7f797
mod_http: Pass util.events object to API, fixes traceback
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Mar 2018 08:47:51 +0100 |
parent | 8594:b4a0bc46c82d |
child | 8969:48d0b908f8b6 |
comparison
equal
deleted
inserted
replaced
8595:d3bbff01df9d | 8596:71da54c7f797 |
---|---|
164 end | 164 end |
165 end | 165 end |
166 return ip; | 166 return ip; |
167 end | 167 end |
168 | 168 |
169 module:wrap_object_event(server, false, function (handlers, event_name, event_data) | 169 module:wrap_object_event(server._events, false, function (handlers, event_name, event_data) |
170 local request = event_data.request; | 170 local request = event_data.request; |
171 if request then | 171 if request then |
172 -- Not included in eg http-error events | 172 -- Not included in eg http-error events |
173 request.ip = get_ip_from_request(request); | 173 request.ip = get_ip_from_request(request); |
174 end | 174 end |