tangled
alpha
login
or
join now
arabica.social
/
arabica
7
fork
atom
Coffee journaling on ATProto (alpha)
alpha.arabica.social
coffee
7
fork
atom
overview
issues
pulls
pipelines
feat: log request headers
pdewey.com
2 months ago
55bc6ac6
a6a5c867
verified
This commit was signed with the committer's
known signature
.
pdewey.com
SSH Key Fingerprint:
SHA256:ePOVkJstqVLchGK8m9/OGQG+aFNHD5XN3xjvW9wKCA4=
+7
1 changed file
expand all
collapse all
unified
split
internal
middleware
logging.go
+7
internal/middleware/logging.go
···
92
92
logEvent.Str("user_did", did)
93
93
}
94
94
95
95
+
// Log all request headers for debugging malicious traffic
96
96
+
headers := make(map[string]string)
97
97
+
for name, values := range r.Header {
98
98
+
headers[name] = strings.Join(values, ", ")
99
99
+
}
100
100
+
logEvent.Interface("headers", headers)
101
101
+
95
102
logEvent.Msg("HTTP request")
96
103
})
97
104
}