summaryrefslogtreecommitdiff
path: root/internal/middleware/requestid.go
diff options
context:
space:
mode:
authorLibravatar Dominik Süß <dominik@suess.wtf>2023-05-09 19:19:48 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-09 18:19:48 +0100
commit6392e00653d3b81062ef60d8ae2fa2621873533f (patch)
tree761d0ff445c2c6a85020cecdc58f92ae1cf78513 /internal/middleware/requestid.go
parent[bugfix] Don't try to get user when serializing local instance account (#1757) (diff)
downloadgotosocial-6392e00653d3b81062ef60d8ae2fa2621873533f.tar.xz
feat: initial tracing support (#1623)
Diffstat (limited to 'internal/middleware/requestid.go')
-rw-r--r--internal/middleware/requestid.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/middleware/requestid.go b/internal/middleware/requestid.go
index 6e2a83c68..3bf38092f 100644
--- a/internal/middleware/requestid.go
+++ b/internal/middleware/requestid.go
@@ -65,9 +65,8 @@ func generateID() string {
// AddRequestID returns a gin middleware which adds a unique ID to each request (both response header and context).
func AddRequestID(header string) gin.HandlerFunc {
return func(c *gin.Context) {
- // Look for existing ID.
id := c.GetHeader(header)
-
+ // Have we found anything?
if id == "" {
// Generate new ID.
//