moebooru: proxy images to avoid hotlink protection (#3911).

Fix image previews being broken on the upload page due to yande.re not
allowing hotlinking of images.
This commit is contained in:
evazion
2018-10-06 00:58:22 -05:00
parent 9301bf2f11
commit 7eee77d520

View File

@@ -76,6 +76,10 @@ module Sources
nil
end
def headers
{ "Referer" => "http://#{site_name}" }
end
# Moebooru returns an empty array when doing an md5:<hash> search for a
# deleted post. Because of this, api_response may be empty in some cases.
def api_response