pub struct ServerConfig {
pub host: String,
pub port: u16,
pub api_server_url: String,
pub api_internal_url: String,
pub api_external_url: String,
pub use_https: bool,
pub cors_allowed_origins: Vec<String>,
pub content_negotiation: ContentNegotiationConfig,
pub security_headers: SecurityHeadersConfig,
pub instance_id: Option<String>,
pub max_concurrent_streams: usize,
pub trusted_proxies: Vec<String>,
}Fields§
§host: String§port: u16§api_server_url: String§api_internal_url: String§api_external_url: String§use_https: bool§cors_allowed_origins: Vec<String>§content_negotiation: ContentNegotiationConfig§security_headers: SecurityHeadersConfig§instance_id: Option<String>Stable identifier for this replica. Empty/unset resolves to the OS hostname (or a generated short id) at config build time.
max_concurrent_streams: usizeGlobal cap on concurrent A2A SSE streams for this replica.
trusted_proxies: Vec<String>CIDR ranges whose immediate-peer requests are allowed to set
X-Forwarded-For, X-Real-IP, and CF-Connecting-IP. Empty
means the platform treats every connection as direct and ignores
those headers — the only safe default behind no proxy. Each entry
is a CIDR string (e.g. 10.0.0.0/8, 192.168.1.0/24,
2001:db8::/32). Single addresses without a / are accepted as
/32 (IPv4) or /128 (IPv6).
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ServerConfig
impl JsonSchema for ServerConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more