From b58359c73a8d5be46ef5e471bec2d33f8f4c7372 Mon Sep 17 00:00:00 2001 From: Lucas Pickering Date: Thu, 24 Oct 2024 20:56:33 -0400 Subject: [PATCH] Fix ignore_certificate_hosts and large_body_size config fields --- crates/config/src/lib.rs | 1 + crates/core/src/http.rs | 1 + docs/src/api/configuration/index.md | 1 + 3 files changed, 3 insertions(+) diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index c5fc01f3..15287b5f 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -42,6 +42,7 @@ pub struct Config { /// Command to use for in-app editing. If provided, overrides /// `VISUAL`/`EDITOR` environment variables pub editor: Option, + #[serde(flatten)] pub http: HttpEngineConfig, /// Should templates be rendered inline in the UI, or should we show the /// raw text? diff --git a/crates/core/src/http.rs b/crates/core/src/http.rs index 72fcd96a..65a36988 100644 --- a/crates/core/src/http.rs +++ b/crates/core/src/http.rs @@ -293,6 +293,7 @@ impl Default for HttpEngine { } #[derive(Debug, Serialize, Deserialize)] +#[serde(default)] pub struct HttpEngineConfig { /// TLS cert errors on these hostnames are ignored. Be careful! pub ignore_certificate_hosts: Vec, diff --git a/docs/src/api/configuration/index.md b/docs/src/api/configuration/index.md index 2712a537..a642eb44 100644 --- a/docs/src/api/configuration/index.md +++ b/docs/src/api/configuration/index.md @@ -36,5 +36,6 @@ SLUMBER_CONFIG_PATH=~/dotfiles/slumber.yml slumber | `editor` | `string` | Command to use when opening files for in-app editing. [More info](./editor.md) | `VISUAL`/`EDITOR` env vars | | `ignore_certificate_hosts` | `string[]` | Hostnames whose TLS certificate errors will be ignored. [More info](../../troubleshooting/tls.md) | `[]` | | `input_bindings` | `mapping[Action, KeyCombination[]]` | Override default input bindings. [More info](./input_bindings.md) | `{}` | +| `large_body_size` | `number` | Size over which request/response bodies are not formatted/highlighted, for performance (bytes) | `1000000` (1 MB) | | `preview_templates` | `boolean` | Render template values in the TUI? If false, the raw template will be shown. | `true` | | `theme` | [`Theme`](./theme.md) | Visual customizations | `{}` |