Skip to main content

update_rate_limit_settings

Function update_rate_limit_settings 

Source
pub async fn update_rate_limit_settings(
    strict_per_sec: u32,
    strict_burst: u32,
    upload_per_sec: u32,
    upload_burst: u32,
    image_per_sec: u32,
    image_burst: u32,
    comment_per_sec: u32,
    comment_burst: u32,
    comment_upload_per_sec: u32,
    comment_upload_burst: u32,
    comment_upload_daily: u32,
    code_exec_per_sec: u32,
    code_exec_burst: u32,
    code_exec_daily: u32,
    unknown_per_sec: u32,
    unknown_burst: u32,
    gc_interval_secs: u32,
) -> Result<RateLimitSettings, ServerFnError>
Expand description

更新限流配置。

所有字段会被 clamp 后写入 DB。由于限流器是 LazyLock 静态量(首次请求构造即 固化),修改后需重启进程生效——不做运行时缓存失效。

§Handler information

  • Method: post
  • Path: <auto>