freeze break request: add requesting ip address to geoip

Kevin Fenzi kevin at scrye.com
Mon Sep 16 16:25:33 UTC 2013


The gnome folks would like to also start using our geoip service (at
least for now), but their code expects to also find the ip address that
requested in the results. They are going into a freeze tomorrow, so
they would really prefer this land today. 

We have tested in stg and they have run their tests against stg just
fine. 

I also talked with anaconda folks who currently use this and they don't
think there will be any issues with adding a new ip:address result in
the output json for them. 

Thanks to Xavier for poking at this!

+1s?

kevin
--
diff --git a/modules/geoip-city-wsgi/files/geoip-city.wsgi
b/modules/geoip-city-wsgi/files/geoip-city.wsgi index 3a00f60..9435820
100755 --- a/modules/geoip-city-wsgi/files/geoip-city.wsgi
+++ b/modules/geoip-city-wsgi/files/geoip-city.wsgi
@@ -59,6 +59,7 @@ def application(environ, start_response):
         response.status_code=code
         return response(environ, start_response)
 
+    results['ip'] = client_ip
     results = json.dumps(results)
     response.headers['Content-Length'] = str(len(results))
     response.write(results)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20130916/64bd88b6/attachment.sig>


More information about the infrastructure mailing list