@@ -18,7 +18,7 @@ var logHelpers = logger.New("server:helpers")
1818// and logs connection details. Returns empty string if validation fails.
1919func extractAndValidateSession (r * http.Request ) string {
2020 logHelpers .Printf ("Extracting session from request: remote=%s, path=%s" , r .RemoteAddr , r .URL .Path )
21-
21+
2222 authHeader := r .Header .Get ("Authorization" )
2323 sessionID := auth .ExtractSessionID (authHeader )
2424
@@ -38,7 +38,7 @@ func extractAndValidateSession(r *http.Request) string {
3838// The backendID parameter is optional and can be empty for unified mode.
3939func logHTTPRequestBody (r * http.Request , sessionID , backendID string ) {
4040 logHelpers .Printf ("Checking request body: method=%s, hasBody=%v, sessionID=%s" , r .Method , r .Body != nil , sessionID )
41-
41+
4242 if r .Method != "POST" || r .Body == nil {
4343 logHelpers .Printf ("Skipping body logging: not a POST request or no body present" )
4444 return
@@ -70,7 +70,7 @@ func logHTTPRequestBody(r *http.Request, sessionID, backendID string) {
7070// Returns the modified request with updated context.
7171func injectSessionContext (r * http.Request , sessionID , backendID string ) * http.Request {
7272 logHelpers .Printf ("Injecting session context: sessionID=%s, backendID=%s" , sessionID , backendID )
73-
73+
7474 ctx := context .WithValue (r .Context (), SessionIDContextKey , sessionID )
7575
7676 if backendID != "" {
0 commit comments