diff options
| author | Fuwn <[email protected]> | 2023-05-30 07:55:44 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-30 07:55:44 +0000 |
| commit | 5e0fccecb9d984f8b65928e86067f96a8cead1f1 (patch) | |
| tree | 75336fe0b89d4b71822ab35700652a67a69ad015 /src | |
| parent | ci(docker): remove problematic sccache (diff) | |
| download | september-5e0fccecb9d984f8b65928e86067f96a8cead1f1.tar.xz september-5e0fccecb9d984f8b65928e86067f96a8cead1f1.zip | |
fix(response): header only on non-proxy routes
Diffstat (limited to 'src')
| -rw-r--r-- | src/response.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/response.rs b/src/response.rs index f156603..6024b0a 100644 --- a/src/response.rs +++ b/src/response.rs @@ -184,9 +184,11 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< html_context.push_str(&format!("<title>{gemini_title}</title>")); html_context.push_str("</head><body>"); - if let Ok(header) = var("HEADER") { - html_context - .push_str(&format!("<big><blockquote>{header}</blockquote></big>")); + if !req.path().starts_with("/proxy") { + if let Ok(header) = var("HEADER") { + html_context + .push_str(&format!("<big><blockquote>{header}</blockquote></big>")); + } } match response.status() { |