Server and contracts: public URL on port 443 (D-124)
Kvitt is served on the default HTTPS port through Nginx Proxy Manager, so the OpenAPI server is https://{host} (contracts/openapi.yaml and openapi.rs PUBLIC_SERVER_URL), examples E-7 public_url and E-12 link are https://kvitt.example.invalid without a port, tools/contracts-check.py expects the portless header, and the server's tests, config message and README name no port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -69,7 +69,7 @@ impl Config {
|
||||
AppError::new(
|
||||
crate::error::ErrorCode::Internal,
|
||||
"KVITT_PUBLIC_URL is not set: it must be the Kvitt base URL, \
|
||||
https://<KVITT_PUBLIC_HOST>:8443 (SPEC §10.4)",
|
||||
https://<KVITT_PUBLIC_HOST> (SPEC §10.4)",
|
||||
)
|
||||
})?;
|
||||
Ok(Self {
|
||||
@@ -102,7 +102,7 @@ impl Config {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
const PUBLIC_URL: &str = "https://kvitt.example.invalid:8443";
|
||||
const PUBLIC_URL: &str = "https://kvitt.example.invalid";
|
||||
|
||||
#[test]
|
||||
fn defaults_when_unset_or_empty() {
|
||||
|
||||
@@ -37,7 +37,7 @@ strings. Common rules: SPEC §14.3.1.";
|
||||
|
||||
/// The production base URL (SPEC §7, §14.3): the host is the server variable [`HOST_VARIABLE`], because the Kvitt
|
||||
/// host name is owner-chosen (SPEC §10.5).
|
||||
pub const PUBLIC_SERVER_URL: &str = "https://{host}:8443";
|
||||
pub const PUBLIC_SERVER_URL: &str = "https://{host}";
|
||||
/// The server variable in [`PUBLIC_SERVER_URL`].
|
||||
pub const HOST_VARIABLE: &str = "host";
|
||||
/// The default of [`HOST_VARIABLE`]: a reserved name that never resolves (RFC 6761), not a real host.
|
||||
|
||||
Reference in New Issue
Block a user