Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update log format to include X-Forwarded-For to capture users IP in logs #359

Open
jonespm opened this issue May 18, 2022 · 1 comment · Fixed by #507 · May be fixed by #605
Open

Update log format to include X-Forwarded-For to capture users IP in logs #359

jonespm opened this issue May 18, 2022 · 1 comment · Fixed by #507 · May be fixed by #605
Assignees
Labels
Effort: 8 Effort estimated at full day

Comments

@jonespm
Copy link
Member

jonespm commented May 18, 2022

We had an email discussion in January 2022 to determine the source of traffic and changing the log to include the origin IP. It was suggested that the guincorn configuration could pick this up from:

access_log_format = '%({X-Forwarded-For}i)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s %(

@jlost commented that "As for ROHQ, you could probably inline that line on the CMD if you think it's worth it to update."

@jonespm
Copy link
Member Author

jonespm commented Jun 18, 2024

We tried a simple fix to this but it didn't seem to work and also @jxiao21 noticed that there were still multiple different log formats. I think we'll might have to fix this in a different way.

This might involve loading a logging config into asgi.py and also having a XForwardedForMiddleware to be able to parse out the header. I'm not entirely sure yet.

@jonespm jonespm added the Effort: 4 Effort estimated at half-day label Jun 18, 2024
@jonespm jonespm added Effort: 8 Effort estimated at full day and removed Effort: 4 Effort estimated at half-day labels Jul 15, 2024
@jonespm jonespm moved this from To Do to In Progress in ROHQ 2025.01.01 Jan 14, 2025
jonespm added a commit to jonespm/remote-office-hours-queue that referenced this issue Jan 21, 2025
@jonespm jonespm linked a pull request Jan 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment