diff options
| author | Fuwn <[email protected]> | 2026-02-10 13:12:46 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-10 13:12:46 +0000 |
| commit | 1cb2515da857374b695dc82138f271d287ad2e15 (patch) | |
| tree | 629f0a2bdb7ed92ced8fd976e4653f717ee59f45 /src/environment.rs | |
| parent | chore: Bump version patch to v0.3.2 (diff) | |
| download | september-1cb2515da857374b695dc82138f271d287ad2e15.tar.xz september-1cb2515da857374b695dc82138f271d287ad2e15.zip | |
feat: Support HTTP/0.9
Diffstat (limited to 'src/environment.rs')
| -rw-r--r-- | src/environment.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/environment.rs b/src/environment.rs index dd10171..bd99081 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -17,6 +17,8 @@ pub struct Environment { pub proxy_by_default: bool, pub keep_gemini: Option<Vec<String>>, pub embed_images: Option<String>, + pub http09: bool, + pub http09_port: u16, } impl Environment { @@ -51,6 +53,13 @@ impl Environment { .ok() .map(|s| s.split(',').map(String::from).collect()), embed_images: std::env::var("EMBED_IMAGES").ok(), + http09: std::env::var("HTTP09") + .map(|v| v.to_lowercase() == "true") + .unwrap_or(false), + http09_port: std::env::var("HTTP09_PORT") + .ok() + .and_then(|p| p.parse().ok()) + .unwrap_or(90), } } } |