Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version = "0.0.0"
edition = "2024"

[workspace.dependencies]
code0-flow = { version = "0.0.40", features = ["flow_health", "flow_config", "flow_service"] }
tucana = { version = "0.0.75", features = ["aquila"] }
code0-flow = { version = "0.0.41", features = ["flow_health", "flow_config", "flow_service"] }
tucana = { version = "0.0.76", features = ["aquila"] }
serde_json = { version = "1.0.138" }
log = "0.4.27"
env_logger = "0.11.8"
Expand Down
2 changes: 2 additions & 0 deletions adapter/rest/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct HttpServerConfig {
pub external_port: u16,
pub host: String,
pub external_host: String,
pub https_configured: bool,
}

impl LoadConfig for HttpServerConfig {
Expand All @@ -19,6 +20,7 @@ impl LoadConfig for HttpServerConfig {
port,
external_port: env_with_default("EXTERNAL_HTTP_SERVER_PORT", port),
external_host: env_with_default("EXTERNAL_HTTP_SERVER_HOST", host),
https_configured: env_with_default("HTTPS_CONFIGURED", false),
}
}
}
6 changes: 6 additions & 0 deletions adapter/rest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ async fn main() {
let external_addr = runner.get_server_config().external_port;
let external_host = runner.get_server_config().external_host.clone();

let protocol = match runner.get_server_config().https_configured {
true => String::from("https"),
false => String::from("http"),
};

let configs = vec![ModuleDefinitionAppendix {
module_identifier: String::from("draco-rest"),
definitions: vec![ModuleDefinition {
Expand All @@ -42,6 +47,7 @@ async fn main() {
host: external_host,
port: external_addr as i64,
endpoint: String::from(r"/${{project_slug}}${{httpURL}}"),
protocol: protocol,
},
)),
}],
Expand Down