mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
chore: drop the route types the cors restructure replaced
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user