aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/config.rs8
-rw-r--r--tests/serve_request.rs6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/config.rs b/src/config.rs
index 5d2d7e8..953bba1 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -196,13 +196,13 @@ impl MiniserveConfig {
// Otherwise, we should apply route_prefix to static files.
let (favicon_route, css_route) = if args.random_route {
(
- format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)),
- format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)),
+ "/__miniserve_internal/favicon.svg".into(),
+ "/__miniserve_internal/style.css".into(),
)
} else {
(
- format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)),
- format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)),
+ format!("{}/{}", route_prefix, "__miniserve_internal/favicon.ico"),
+ format!("{}/{}", route_prefix, "__miniserve_internal/style.css"),
)
};
diff --git a/tests/serve_request.rs b/tests/serve_request.rs
index a53abf9..f840efd 100644
--- a/tests/serve_request.rs
+++ b/tests/serve_request.rs
@@ -290,9 +290,9 @@ fn serves_requests_with_route_prefix(#[case] server: TestServer) -> Result<(), E
}
#[rstest]
-#[case(server(&[] as &[&str]), "/[a-f0-9]+")]
-#[case(server(&["--random-route"]), "/[a-f0-9]+")]
-#[case(server(&["--route-prefix", "foobar"]), "/foobar/[a-f0-9]+")]
+#[case(server(&[] as &[&str]), "/__miniserve_internal/[a-z.]+")]
+#[case(server(&["--random-route"]), "/__miniserve_internal/[a-z.]+")]
+#[case(server(&["--route-prefix", "foobar"]), "/foobar/__miniserve_internal/[a-z.]+")]
fn serves_requests_static_file_check(
#[case] server: TestServer,
#[case] static_file_pattern: String,