fix: ComfyUI wildcard route syntax for axum 0.8+
- Changed to in comfyui proxy route - Added config.toml for local dev - Verified: Rust backend starts and serves /healthz, /api/sites, /api/events, /api/tasks, /api/settings, /api/organizations/plans - 18/18 tests pass
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
[server]
|
||||||
|
host = "0.0.0.0"
|
||||||
|
port = 3002
|
||||||
|
log_level = "info"
|
||||||
|
cors_origins = ["*"]
|
||||||
|
|
||||||
|
[db]
|
||||||
|
url = "sqlite://../data/hub.db?mode=rwc"
|
||||||
|
max_connections = 10
|
||||||
|
ssl = false
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
jwt_secret = "dev-jwt-secret-change-in-production"
|
||||||
|
jwt_expiry_hours = 168
|
||||||
|
auth_token = "change-me-admin-token"
|
||||||
|
proxy_token = "sk-boos4721"
|
||||||
|
|
||||||
|
[proxy]
|
||||||
|
upstream_timeout_secs = 300
|
||||||
|
first_byte_timeout_secs = 60
|
||||||
|
max_retries = 3
|
||||||
|
proxy_log_retention_days = 30
|
||||||
@@ -82,7 +82,7 @@ pub fn routes() -> Router<AppState> {
|
|||||||
.route("/api/comfyui/queue", get(proxy_get_queue))
|
.route("/api/comfyui/queue", get(proxy_get_queue))
|
||||||
.route("/api/comfyui/view", get(proxy_get_view))
|
.route("/api/comfyui/view", get(proxy_get_view))
|
||||||
// Static proxy (public — assets/JS/CSS)
|
// Static proxy (public — assets/JS/CSS)
|
||||||
.route("/api/comfyui/proxy/*path", get(proxy_static))
|
.route("/api/comfyui/proxy/{*path}", get(proxy_static))
|
||||||
// HTML page (public)
|
// HTML page (public)
|
||||||
.route("/comfyui", get(comfyui_page))
|
.route("/comfyui", get(comfyui_page))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user