modernize: migrate to Leptos 0.8 and Server Functions architecture, break backend->shared loop
Some checks failed
Build MIPS Binary / build (push) Failing after 1m27s

This commit is contained in:
spinline
2026-02-09 20:07:28 +03:00
parent 5a8f5169ea
commit e6d00e9d55
11 changed files with 1026 additions and 384 deletions

View File

@@ -4,9 +4,9 @@ mod handlers;
#[cfg(feature = "push-notifications")]
mod push;
mod rate_limit;
mod scgi;
mod sse;
mod xmlrpc;
use shared::{scgi, xmlrpc};
use axum::error_handling::HandleErrorLayer;
use axum::{
@@ -59,6 +59,7 @@ async fn auth_middleware(
if path.starts_with("/api/auth/login")
|| path.starts_with("/api/auth/check") // Used by frontend to decide where to go
|| path.starts_with("/api/setup")
|| path.starts_with("/api/server_fns")
|| path.starts_with("/swagger-ui")
|| path.starts_with("/api-docs")
|| !path.starts_with("/api/") // Allow static files (frontend)
@@ -528,6 +529,7 @@ async fn main() {
"/api/settings/global-limits",
get(handlers::get_global_limit_handler).post(handlers::set_global_limit_handler),
)
.route("/api/server_fns/{*fn_name}", post(leptos_axum::handle_server_fns))
.fallback(handlers::static_handler); // Serve static files for everything else
#[cfg(feature = "push-notifications")]