Skip to content

Commit

Permalink
fix: Append headers for envoy
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed May 29, 2024
1 parent 260ddcd commit fb5545a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/actix-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ async fn envoy_external_auth(logged_user: Option<UserSession>) -> Result<HttpRes
if let Some(logged_user) = logged_user {
let mut resp = HttpResponse::Ok();
resp.append_header((USER_HEADER_NAME, format!("{:?}", logged_user.user_id)));
resp.append_header((X_FORWARDED_USER, format!("{:?}", logged_user.user_id)));
resp.append_header((X_FORWARDED_EMAIL, format!("{:?}", logged_user.email)));
Ok(resp.finish())
} else {
Ok(HttpResponse::Forbidden().finish())
Expand Down

0 comments on commit fb5545a

Please sign in to comment.