Skip to content

Commit

Permalink
fix: Allow unspecified filters key (#141)
Browse files Browse the repository at this point in the history
Previously the `filters` key is required for an `endpoint` definition.
Now we have cases where the `filters` are no longer needed:

- endpoints with on-the-fly filters
- endpoints merely meant to proxy upstream feeds (for example, with
templated source)

In such cases, we should allow the user to omit the unncessary `filters`
key altogether.
  • Loading branch information
shouya committed Aug 6, 2024
1 parent 9b896f9 commit f05b2a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl EndpointConfig {
pub struct EndpointServiceConfig {
#[serde(default)]
source: Option<SourceConfig>,
#[serde(default)]
filters: FilterPipelineConfig,
#[serde(default)]
on_the_fly_filters: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/server/image_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy_static::lazy_static! {
}

pub fn router() -> Router {
info!("loaded image proxy: /_image");
info!("handling image proxy: /_image");

use tower_http::cors::AllowOrigin;
let cors = CorsLayer::new()
Expand Down

0 comments on commit f05b2a3

Please sign in to comment.