refactor: use shared reqwest::Client across all registry handlers

Add http_client field to AppState, initialized once at startup.
Replace per-request Client::builder() calls in npm, maven, pypi,
and docker registry handlers with the shared instance.
This reuses the connection pool across requests instead of
creating a new client on every proxy fetch.

Bump version to 0.2.20.
This commit is contained in:
2026-02-23 07:45:44 +00:00
parent ffac4f0286
commit 42e71b9195
7 changed files with 42 additions and 61 deletions

6
Cargo.lock generated
View File

@@ -1201,7 +1201,7 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21"
[[package]]
name = "nora-cli"
version = "0.2.18"
version = "0.2.20"
dependencies = [
"clap",
"flate2",
@@ -1215,7 +1215,7 @@ dependencies = [
[[package]]
name = "nora-registry"
version = "0.2.18"
version = "0.2.20"
dependencies = [
"async-trait",
"axum",
@@ -1253,7 +1253,7 @@ dependencies = [
[[package]]
name = "nora-storage"
version = "0.2.18"
version = "0.2.20"
dependencies = [
"axum",
"base64",