aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-29 04:46:03 +0000
committerFuwn <[email protected]>2023-05-29 04:46:03 +0000
commit4880e7241414859a4b1419df29e81502c8af65c1 (patch)
treedc3ceca3150aa9a25fb6f92759d62a6cd2599f5f /src
parentfeat(Cargo.toml): bump to 0.2.6 (diff)
downloadseptember-4880e7241414859a4b1419df29e81502c8af65c1.tar.xz
september-4880e7241414859a4b1419df29e81502c8af65c1.zip
feat(response): optional proxy header
Diffstat (limited to 'src')
-rw-r--r--src/response.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/response.rs b/src/response.rs
index d7142c4..f156603 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -184,6 +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>"));
+ }
+
match response.status() {
germ::request::Status::Success => {
html_context.push_str(&gemini_html.1);