// Copyright (C) 2026 Ordinary Labs, LLC.
//
// SPDX-License-Identifier: AGPL-3.0-only

use serde::{Deserialize, Serialize};

#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[cfg_attr(feature = "docs", derive(schemars::JsonSchema))]
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct MiddlewareLimits {
    /// max number of proxies per application.
    pub count: u16,
    /// a list of any internal or external target
    /// regexes that should be disallowed.
    pub disallowed_endpoints: Vec<String>,
}

impl Default for MiddlewareLimits {
    fn default() -> Self {
        Self {
            count: u16::MAX,
            disallowed_endpoints: vec![],
        }
    }
}
