m-cloud API Documentation - v1.0.1-beta.5
    Preparing search index...

    Interface AppConfig

    应用配置接口 定义应用的全局配置选项 AppConfig

    interface AppConfig {
        debug?: boolean;
        maxBodySize?: number;
        encryption?: {
            defaultKey?: { password: string; salt?: string };
            sensitiveFields?: string[];
        };
        cache?: { enabled?: boolean; ttl?: number; maxSize?: number };
        versionConfig?: { supported: string[]; default: string; prefix?: string };
    }
    Index

    Properties

    debug?: boolean

    调试模式开关

    maxBodySize?: number

    最大请求体大小(字节),默认 1MB

    encryption?: {
        defaultKey?: { password: string; salt?: string };
        sensitiveFields?: string[];
    }

    加密配置

    Type Declaration

    • OptionaldefaultKey?: { password: string; salt?: string }

      默认加密密钥配置

      • password: string

        密码

      • Optionalsalt?: string

        盐值(可选)

    • OptionalsensitiveFields?: string[]

      敏感字段列表,用于数据脱敏

    cache?: { enabled?: boolean; ttl?: number; maxSize?: number }

    缓存配置

    Type Declaration

    • Optionalenabled?: boolean

      是否启用缓存

    • Optionalttl?: number

      缓存过期时间(毫秒)

    • OptionalmaxSize?: number

      最大缓存条目数

    versionConfig?: { supported: string[]; default: string; prefix?: string }

    API 版本控制配置

    Type Declaration

    • supported: string[]

      支持的版本列表

    • default: string

      默认版本

    • Optionalprefix?: string

      版本前缀(默认 'v')