From 6be7f17fb1d7715af3f37d792444c20c953dca9f Mon Sep 17 00:00:00 2001 From: "dobby-yivi-agent[bot]" <275734547+dobby-yivi-agent[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 13:42:38 +0000 Subject: [PATCH] chore: replace pkg_url with https://pkg.postguard.eu/ Replace the production PKG URL https://postguard-main.cs.ru.nl/pkg with https://pkg.postguard.eu/ in conf/config.toml and the commented example in conf/config.dev.toml. Since the new URL carries a trailing slash, harden the startup parameter fetch in rocket() to trim a trailing slash before appending /v2/sign/parameters (mirroring the existing trim in PkgClient::validate_api_key), avoiding a // in the request path. Co-Authored-By: Claude Opus 4.8 --- conf/config.dev.toml | 2 +- conf/config.toml | 2 +- src/main.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/config.dev.toml b/conf/config.dev.toml index 0e51aaa..bc16619 100644 --- a/conf/config.dev.toml +++ b/conf/config.dev.toml @@ -11,7 +11,7 @@ smtp_tls = false # smtp_password = "pw" allowed_origins = "^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$" usage_db = "/app/data/usage.db" -# pkg_url = "https://postguard-main.cs.ru.nl/pkg" +# pkg_url = "https://pkg.postguard.eu/" # pkg_url = "https://pkg.staging.yivi.app" pkg_url = "http://postguard-pkg:8087" chunk_size = 5000000 diff --git a/conf/config.toml b/conf/config.toml index b5aaff7..56b0cd0 100644 --- a/conf/config.toml +++ b/conf/config.toml @@ -8,4 +8,4 @@ smtp_port = 1025 # smtp_username = "user" # smtp_password = "pw" allowed_origins = "^https://postguard.(eu|nl)$" -pkg_url = "https://postguard-main.cs.ru.nl/pkg" +pkg_url = "https://pkg.postguard.eu/" diff --git a/src/main.rs b/src/main.rs index a6c0b9e..4bf00e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1318,7 +1318,10 @@ async fn rocket() -> _ { .extract::() .expect("Missing configuration"); - let pkg_params_url = format!("{}/v2/sign/parameters", config.pkg_url()); + let pkg_params_url = format!( + "{}/v2/sign/parameters", + config.pkg_url().trim_end_matches('/') + ); let response = minreq::get(&pkg_params_url) .with_timeout(10) .send()