aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-30 07:55:44 +0000
committerFuwn <[email protected]>2023-05-30 07:55:44 +0000
commitdfbaff0e775436b7b90b57381df2740cfbdacfb7 (patch)
treedeff9765f8947100add396077a3b6451966079ec /src
parentci(docker): remove problematic sccache (diff)
downloadseptember-dfbaff0e775436b7b90b57381df2740cfbdacfb7.tar.xz
september-dfbaff0e775436b7b90b57381df2740cfbdacfb7.zip
fix(response): header only on non-proxy routes
Diffstat (limited to 'src')
-rw-r--r--src/response.rs8
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() {