Closed Bug 555069 Opened 14 years ago Closed 14 years ago

Add IP to logging

Categories

(addons.mozilla.org Graveyard :: Code Quality, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: jsocol)

Details

(Whiteboard: [qa-])

We should add the request's IP to the logging.  Make sure we check X_FORWARDED_FOR.  Django should have this built in somewhere, if not, maybe a patch would be appropriate.

P5 for now.  Whoever gets time can do this, or I will eventually.
Django used to have a middleware for this: http://docs.djangoproject.com/en/dev/releases/1.1/#id1
Assignee: nobody → james
Target Milestone: 5.9 → 5.10
Summary: Add IP to loggging → Add IP to logging
Here's middleware to replace the old Django middleware.

http://github.com/jsocol/commonware
I think that will work, r+.  Replacing REMOTE_ADDR seems fine but I don't think I've seen it before.  Shouldn't matter though.
Wil, I followed Django's old method. If you'd rather it do something else, I can change it.
I think it'll work fine :)
Added some comments on the commit.  r+, thanks
http://github.com/jbalogh/zamboni/commit/470e8935a45c73e0f5e768f70cca8041c9f0b104
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.