Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process headers_to_remove #107

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If value is None it calls proxy_remove_header_map_value

)
.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
Loading