Fix proxying of NSFW images

This commit is contained in:
spikecodes 2021-01-05 08:15:34 -08:00
parent 2185d895c0
commit 2b0193f5ea

View file

@ -124,7 +124,7 @@ pub fn param(path: &str, value: &str) -> String {
// Direct urls to proxy if proxy is enabled // Direct urls to proxy if proxy is enabled
pub fn format_url(url: String) -> String { pub fn format_url(url: String) -> String {
if url.is_empty() || url == "self" || url == "default" { if url.is_empty() || url == "self" || url == "default" || url == "nsfw" {
String::new() String::new()
} else { } else {
format!("/proxy/{}", encode(url).as_str()) format!("/proxy/{}", encode(url).as_str())