Use remote_addr if no x-forwarded-for
diff --git a/heka/files/lua/decoders/apache_wsgi_log.lua b/heka/files/lua/decoders/apache_wsgi_log.lua
index e35b1ed..48a4524 100644
--- a/heka/files/lua/decoders/apache_wsgi_log.lua
+++ b/heka/files/lua/decoders/apache_wsgi_log.lua
@@ -68,6 +68,8 @@
         end
         if m.http_x_forwarded_for and patt.ip_address:match(m.http_x_forwarded_for) then
             msg.Fields.http_client_ip_address = m.http_x_forwarded_for
+        else if m.remote_addr then
+            msg.Fields.http_client_ip_address = m.remote_addr
         end
 
         local request = m.request