Skip to content
Open
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions crates/trusted-server-core/src/request_signing/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn handle_trusted_server_discovery(

Ok(Response::from_status(200)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&json))
.with_body(json))
}

#[derive(Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -118,7 +118,7 @@ pub fn handle_verify_signature(

Ok(Response::from_status(200)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&response_json))
.with_body(response_json))
}

#[derive(Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -199,7 +199,7 @@ pub fn handle_rotate_key(

Ok(Response::from_status(200)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&response_json))
.with_body(response_json))
}
Err(e) => {
let response = RotateKeyResponse {
Expand All @@ -220,7 +220,7 @@ pub fn handle_rotate_key(

Ok(Response::from_status(500)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&response_json))
.with_body(response_json))
}
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ pub fn handle_deactivate_key(

Ok(Response::from_status(200)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&response_json))
.with_body(response_json))
}
Err(e) => {
let response = DeactivateKeyResponse {
Expand All @@ -329,7 +329,7 @@ pub fn handle_deactivate_key(

Ok(Response::from_status(500)
.with_content_type(fastly::mime::APPLICATION_JSON)
.with_body_text_plain(&response_json))
.with_body(response_json))
}
}
}
Expand Down
Loading