Skip to content

Commit

Permalink
Process headers_to_remove
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
  • Loading branch information
adam-cattermole committed Oct 8, 2024
1 parent fd09258 commit 4359dec
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/service/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ impl AuthService {
match check_response.http_response {
Some(CheckResponse_oneof_http_response::ok_response(ok_response)) => {
debug!("process_auth_grpc_response: received OkHttpResponse");
ok_response
.get_headers_to_remove()
.iter()
.for_each(|header| {
hostcalls::set_map_value(
MapType::HttpResponseHeaders,
header.as_str(),
None,
)
.unwrap()
});
ok_response
.get_response_headers_to_add()
.iter()
Expand All @@ -116,8 +127,7 @@ impl AuthService {
Ok(())
}
Some(CheckResponse_oneof_http_response::denied_response(denied_response)) => {
debug!("process_auth_grpc_response: received DeniedHttpResponse",);

debug!("process_auth_grpc_response: received DeniedHttpResponse");
let mut response_headers = vec![];
let status_code = denied_response.get_status().code;
denied_response.get_headers().iter().for_each(|header| {
Expand Down

0 comments on commit 4359dec

Please sign in to comment.