using System; using System.Collections.Generic; using System.Web; namespace Apewer.Web { /// 选项。 public static class ApiOptions { /// 允许 Invoker 解析 favicon.ico 请求。 /// 默认值:不允许,响应空。 public static bool AllowFavIcon { get; set; } = false; /// 允许 Invoker 解析 robot.txt 请求。 /// 默认值:不允许,拒绝搜索引擎收录根目录。 public static bool AllowRobot { get; set; } = false; /// 允许 Invoker 枚举输出 Applications 或 Functions。 /// 默认值:允许,输出列表。 public static bool AllowEnumerate { get; set; } = true; /// 允许 Invoker 输出 Exception 对象的属性。 /// 默认值:不允许输出。 public static bool AllowException { get; set; } = false; /// 允许 Invoker 输出的 Json 对象缩进。 /// 默认值:不缩进。 public static bool JsonIndent { get; set; } = false; /// 允许 Invoker 输出 Application 列表时包含模块名称。 /// 默认值:不包含。 public static bool WithModuleName { get; set; } = false; /// 允许 Invoker 输出 Application 列表时包含类型名称。 /// 默认值:不包含。 public static bool WithTypeName { get; set; } = false; /// 在响应中包含时间属性。 /// 默认值:不包含。 public static bool WithClock { get; set; } = false; /// 在响应中包含执行 API 的持续时间。 /// 默认值:包含。 public static bool WithDuration { get; set; } = true; /// 在响应中包含 Application 和 Function 属性。 /// 默认值:不包含。 public static bool WithTarget { get; set; } = false; /// 在响应中包含 Access-Control 属性。 /// 默认值:包含。 public static bool WithAccessControl { get; set; } = true; /// 设置 Access-Control-Max-Age 的值。 /// 默认值:60。 public static int AccessControlMaxAge { get; set; } = 60; } }