File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: config:: SentryConfig ;
2
- use http:: header:: AUTHORIZATION ;
2
+ use http:: header:: { AUTHORIZATION , COOKIE } ;
3
3
use sentry:: protocol:: Event ;
4
4
use sentry:: { ClientInitGuard , ClientOptions , TransactionContext } ;
5
5
use std:: sync:: Arc ;
@@ -67,7 +67,7 @@ fn options(config: SentryConfig) -> ClientOptions {
67
67
// they're redacting it downstream.
68
68
request
69
69
. headers
70
- . retain ( |name, _value| AUTHORIZATION != name. as_str ( ) ) ;
70
+ . retain ( |name, _value| AUTHORIZATION != name. as_str ( ) && COOKIE != name . as_str ( ) ) ;
71
71
}
72
72
73
73
Some ( event)
@@ -106,6 +106,7 @@ mod tests {
106
106
( "Authorization" , "secret" ) ,
107
107
( "authorization" , "another secret" ) ,
108
108
( "Accept" , "application/json" ) ,
109
+ ( "Cookie" , "cargo_session=foobar" ) ,
109
110
]
110
111
. into_iter ( )
111
112
. map ( |( k, v) | ( k. to_string ( ) , v. to_string ( ) ) )
You can’t perform that action at this time.
0 commit comments