fix to allow for reverse proxying

This commit is contained in:
TriMill 2022-07-03 17:20:23 -04:00
parent 3b81b5a959
commit 079fe1502d

View file

@ -32,7 +32,8 @@ pub fn start(address: &str, thread_count: usize, state: Arc<Mutex<State>>) -> Ve
continue continue
} }
}; };
let res = match url.path() { let page = url.path().split("/").last().unwrap_or("");
let res = match page {
"/rss.xml" => { "/rss.xml" => {
let guard = state.lock().unwrap(); let guard = state.lock().unwrap();
let header = tiny_http::Header::from_bytes(&b"Content-Type"[..], &b"text/xml"[..]).unwrap(); let header = tiny_http::Header::from_bytes(&b"Content-Type"[..], &b"text/xml"[..]).unwrap();