Skip to content

Commit a8cbd7c

Browse files
committed
Stop logging the referer header
We originally logged this in order to help us separate malicious traffic. Ultimately we've never ended up using this at all. As we're reviewing our privacy policies, this seems like a good time to stop logging things we don't care about that expose additional information about our users.
1 parent a0b36cd commit a8cbd7c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/middleware/log_request.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Log all requests in a format similar to Heroku's router, but with additional
2-
//! information that we care about like User-Agent and Referer
2+
//! information that we care about like User-Agent
33
44
use super::prelude::*;
55
use crate::util::request_header;
@@ -34,14 +34,13 @@ impl Handler for LogRequests {
3434
print!(
3535
"at={level} method={method} path=\"{path}\" \
3636
request_id={request_id} fwd=\"{ip}\" service={time_ms}ms \
37-
status={status} user_agent=\"{user_agent}\" referer=\"{referer}\"",
37+
status={status} user_agent=\"{user_agent}\"",
3838
level = level,
3939
method = req.method(),
4040
path = FullPath(req),
4141
ip = request_header(req, "X-Real-Ip"),
4242
time_ms = response_time,
4343
user_agent = request_header(req, "User-Agent"),
44-
referer = request_header(req, "Referer"), // sic
4544
request_id = request_header(req, "X-Request-Id"),
4645
status = response_code,
4746
);

0 commit comments

Comments
 (0)