diff --git a/event_sidecar/src/lib.rs b/event_sidecar/src/lib.rs index 56da9ba2..1a62c817 100644 --- a/event_sidecar/src/lib.rs +++ b/event_sidecar/src/lib.rs @@ -89,7 +89,9 @@ pub async fn run( outbound_sse_data_receiver, config .emulate_legacy_sse_apis - .contains(&LegacySseApiTag::V1), + .as_ref() + .map(|v| v.contains(&LegacySseApiTag::V1)) + .unwrap_or(false), ); info!(address = %config.event_stream_server.port, "started {} server", "SSE"); tokio::try_join!( diff --git a/event_sidecar/src/types/config.rs b/event_sidecar/src/types/config.rs index 0a826358..5c1d74a6 100644 --- a/event_sidecar/src/types/config.rs +++ b/event_sidecar/src/types/config.rs @@ -32,7 +32,7 @@ pub enum LegacySseApiTag { #[derive(Clone, Debug, Deserialize, PartialEq, Eq)] pub struct SseEventServerConfig { pub enable_server: bool, - pub emulate_legacy_sse_apis: Vec, + pub emulate_legacy_sse_apis: Option>, pub inbound_channel_size: Option, pub outbound_channel_size: Option, pub connections: Vec, @@ -44,7 +44,7 @@ impl Default for SseEventServerConfig { fn default() -> Self { Self { enable_server: true, - emulate_legacy_sse_apis: vec![LegacySseApiTag::V1], + emulate_legacy_sse_apis: Some(vec![LegacySseApiTag::V1]), inbound_channel_size: Some(100), outbound_channel_size: Some(100), connections: vec![],