Skip to content
Merged
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
5 changes: 3 additions & 2 deletions src/commands/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const DOCS_BASE: &str = "https://getfloo.com/docs";

const NO_ALIASES: &[&str] = &[];
const CONFIG_ALIASES: &[&str] = &["app-toml"];
const EGRESS_ALIASES: &[&str] = &["static-ip", "outbound-ip"];

/// Canonical topics in display order. This registry owns discovery, aliases,
/// summaries, and the documentation page each topic resolves to.
Expand Down Expand Up @@ -111,8 +112,8 @@ pub(crate) const TOPICS: &[Topic] = &[
},
Topic {
name: "egress",
summary: "Outbound networking and private-network status",
aliases: NO_ALIASES,
summary: "Outbound networking, the stable outbound IP, and private networks",
aliases: EGRESS_ALIASES,
path: "guides/networking",
},
Topic {
Expand Down
10 changes: 7 additions & 3 deletions src/project_config/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ pub struct AppFileConfig {
/// Route tables pass through unchanged; the server owns their validation.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub routes: Vec<toml::Table>,
/// `[network.tailscale]` passes through unchanged; the server owns its validation
/// (getfloo/floo#4059).
/// `[network]` (`static_egress`, `[network.tailscale]`) passes through unchanged; the
/// server owns its validation (getfloo/floo#4059, getfloo/floo#5057).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub network: Option<toml::Table>,
/// Preview data and deprecated aliases are validated by the server.
Expand Down Expand Up @@ -866,6 +866,8 @@ name = "my-app"
type = "web"
path = "."
port = 8080
[network]
static_egress = true
[network.tailscale]
auth_key_secret = "TAILSCALE_AUTHKEY"
forward = ["db.corp.internal:5432"]
Expand All @@ -875,8 +877,10 @@ forward = ["db.corp.internal:5432"]
let serialized = toml::to_string(&config).unwrap();
let reloaded: AppFileConfig = toml::from_str(&serialized).unwrap();
assert_eq!(reloaded.network, config.network);
let network = config.network.unwrap();
assert_eq!(network["static_egress"].as_bool(), Some(true));
assert_eq!(
config.network.unwrap()["tailscale"]["forward"][0].as_str(),
network["tailscale"]["forward"][0].as_str(),
Some("db.corp.internal:5432")
);
}
Expand Down