Skip to content

Commit

Permalink
Merge branch 'main' into feat/code-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
iharvarauka committed Sep 26, 2024
2 parents 853b114 + 61428d6 commit b923ac0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Changelog history

### 24nd September 2024 (release 0.1.12)

* Removing all logs of remote_address

### 22nd September 2024 (release 0.1.11)

* Updating crates (SSI, Tower)
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.11"
version = "0.1.12"
edition = "2021"
authors = ["Glenn Gore <glenn@affinidi.com>"]
description = "Affinidi DID Resolver"
Expand Down
15 changes: 4 additions & 11 deletions affinidi-did-resolver-cache-server/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ impl IntoResponse for SessionError {

#[derive(Clone, Debug, Serialize)]
pub struct Session {
pub session_id: String, // Unique session transaction ID
pub remote_addr: String, // Remote Socket address
pub session_id: String, // Unique session transaction ID
}

#[async_trait]
Expand All @@ -59,7 +58,7 @@ where
{
type Rejection = SessionError;
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection> {
let remote_addr = if let Some(address) = parts
if let Some(address) = parts
.extensions
.get::<axum::extract::ConnectInfo<SocketAddr>>()
.map(|ci| ci.0)
Expand All @@ -74,15 +73,9 @@ where

let session_id = create_session_id();

info!(
"{}: Connection accepted from address({})",
&session_id, &remote_addr
);
info!("{}: Connection accepted", &session_id);

let session = Session {
session_id,
remote_addr,
};
let session = Session { session_id };

Ok(session)
}
Expand Down

0 comments on commit b923ac0

Please sign in to comment.