mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-08 15:41:20 +02:00
Move Logging to Middleware Package (#1070)
* Use a specialized ResponseWriter in middleware * Track User & Upstream in RequestScope * Wrap responses in our custom ResponseWriter * Add tests for logging middleware * Inject upstream metadata into request scope * Use custom ResponseWriter only in logging middleware * Assume RequestScope is never nil
This commit is contained in:
@@ -34,6 +34,9 @@ type RequestScope struct {
|
||||
// SessionRevalidated indicates whether the session has been revalidated since
|
||||
// it was loaded or not.
|
||||
SessionRevalidated bool
|
||||
|
||||
// Upstream tracks which upstream was used for this request
|
||||
Upstream string
|
||||
}
|
||||
|
||||
// GetRequestScope returns the current request scope from the given request
|
||||
|
||||
Reference in New Issue
Block a user