chore: drop the route types the cors restructure replaced

This commit is contained in:
hugocasa
2026-08-28 18:50:19 +02:00
parent c4e981554d
commit 473be61562
@@ -39,12 +39,6 @@ use {
windmill_object_store::build_object_store_client,
};
/// The route a CORS decision is about, resolved before the request is consumed.
struct CorsRoute {
allowed_origins: Option<Vec<String>>,
http_method: HttpMethod,
}
/// Which router a request's CORS decision must be looked up in.
///
/// A preflight names the method it is asking about in
@@ -92,14 +86,6 @@ fn cors_lookup_path(raw_path: &str) -> Option<String> {
Some(format!("/{}", stripped.trim_end_matches('/')))
}
enum CorsRouteLookup {
/// The routers were readable: `Some` when a trigger matched the request.
Resolved(Option<CorsRoute>),
/// The routers could not be loaded, so whether this path is restricted is
/// unknown.
Unavailable,
}
/// What the middleware should stamp, decided while the routers guard is held.
///
/// Deliberately small and owned: the allowlist itself never leaves the guard,