// 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 ProxyLimits {
    /// max number of proxies per application.
    pub count: u8,
    /// a list of any internal or external target
    /// regexes that should be disallowed.
    pub disallowed_targets: Vec<String>,
}

impl Default for ProxyLimits {
    fn default() -> Self {
        Self {
            count: 255,
            disallowed_targets: vec![],
        }
    }
}
