Skip to main content

normalize_path

Function normalize_path 

Source
pub fn normalize_path(path: &str) -> String
Expand description

Normalises a configured admin path: a single leading slash, no trailing slash, falling back to /admin when empty. manage, /manage, and /manage/ all become /manage. Shared by router and any caller building the panel’s URL (for example a startup banner), so the two never drift.