pub struct ServerSection {
pub listen_address: SocketAddr,
pub grpc_address: SocketAddr,
pub cors_allowed_origins: Vec<String>,
}Expand description
Public transport listener addresses from [server].
Fields§
§listen_address: SocketAddrHTTP/JSON and dashboard listener.
grpc_address: SocketAddrgRPC API and worker-protocol listener.
cors_allowed_origins: Vec<String>Browser origins allowed to make cross-origin (CORS) requests to the
public HTTP API. Empty (the default) is the SECURE default: no
cross-origin request is permitted and no CorsLayer is installed, so a
same-origin deployment behaves byte-identically to before this field
existed. When set, each entry is an exact origin (scheme + host + port,
e.g. http://localhost:5173) the browser dashboard is served from; the
router then answers preflight and emits Access-Control-Allow-Origin
for exactly those origins. There is no wildcard/allow-all default
(ADR-001): cross-origin access is an explicit operator decision, and the
layer never pairs Any with credentials.
Trait Implementations§
Source§impl Clone for ServerSection
impl Clone for ServerSection
Source§fn clone(&self) -> ServerSection
fn clone(&self) -> ServerSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerSection
impl Debug for ServerSection
Source§impl Default for ServerSection
impl Default for ServerSection
Source§impl<'de> Deserialize<'de> for ServerSectionwhere
ServerSection: Default,
impl<'de> Deserialize<'de> for ServerSectionwhere
ServerSection: Default,
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>,
Auto Trait Implementations§
impl Freeze for ServerSection
impl RefUnwindSafe for ServerSection
impl Send for ServerSection
impl Sync for ServerSection
impl Unpin for ServerSection
impl UnsafeUnpin for ServerSection
impl UnwindSafe for ServerSection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request