Bind dashboard to 0.0.0.0 for container accessibility
Dioxus defaults to 127.0.0.1 which is unreachable from outside the container. Hardcode 0.0.0.0 binding so reverse proxies can reach it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,8 @@ pub fn server_start(app: fn() -> Element) -> Result<(), DashboardError> {
|
|||||||
.with_expiry(tower_sessions::Expiry::OnInactivity(Duration::hours(24)))
|
.with_expiry(tower_sessions::Expiry::OnInactivity(Duration::hours(24)))
|
||||||
.with_signed(key);
|
.with_signed(key);
|
||||||
|
|
||||||
let addr = dioxus_cli_config::fullstack_address_or_localhost();
|
let port = dioxus_cli_config::server_port().unwrap_or(8080);
|
||||||
|
let addr = std::net::SocketAddr::from(([0, 0, 0, 0], port));
|
||||||
let listener = tokio::net::TcpListener::bind(addr)
|
let listener = tokio::net::TcpListener::bind(addr)
|
||||||
.await
|
.await
|
||||||
.map_err(|e| DashboardError::Other(format!("Failed to bind: {e}")))?;
|
.map_err(|e| DashboardError::Other(format!("Failed to bind: {e}")))?;
|
||||||
|
|||||||
Reference in New Issue
Block a user