♻️ Simple & Efficient Gemini-to-HTTP Proxy fuwn.net
proxy gemini-protocol protocol gemini http rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(html): replace relative path with absolute path

Fuwn 2dd5ba26 113bafa4

+13 -9
+1 -1
Cargo.toml
··· 2 2 3 3 [package] 4 4 name = "september" 5 - version = "0.2.19" 5 + version = "0.2.20" 6 6 authors = ["Fuwn <contact@fuwn.me>"] 7 7 edition = "2021" 8 8 description = "A simple and efficient Gemini-to-HTTP proxy."
+12 -8
src/html.rs
··· 4 4 Some(format!( 5 5 "gemini://{}{}{}", 6 6 url.domain()?, 7 - { 8 - if href.starts_with('/') { 9 - "" 10 - } else { 11 - "/" 12 - } 13 - }, 7 + { if href.starts_with('/') { "" } else { "/" } }, 14 8 href 15 9 )) 16 10 } ··· 73 67 if href.contains("://") && !href.starts_with("gemini://") { 74 68 surface = true; 75 69 } else if !href.starts_with("gemini://") && !href.starts_with('/') { 76 - href = format!("./{href}"); 70 + href = format!( 71 + "{}/{}", 72 + url.domain().unwrap(), 73 + if url.path().ends_with('/') { 74 + format!("{}{}", url.path(), href) 75 + } else { 76 + format!("{}/{}", url.path(), href) 77 + } 78 + ) 79 + .replace("//", "/"); 80 + href = format!("gemini://{href}"); 77 81 } else if href.starts_with('/') || !href.contains("://") { 78 82 href = link_from_host_href(url, &href)?; 79 83 }