fix: static file support route_prefix
@@ -151,8 +151,11 @@ impl MiniserveConfig {
// Generate some random routes for the favicon and css so that they are very unlikely to conflict with
// real files.
- let favicon_route = format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET));
- let css_route = format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET));
+ let (favicon_route, css_route) = if args.random_route {
+ (format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)), format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)))
+ } else {
+ (format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)), format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)))
+ };
let default_color_scheme = args.color_scheme;
let default_color_scheme_dark = args.color_scheme_dark;
