Check for file before decrypt/dither
This commit is contained in:
@@ -9,6 +9,8 @@ DITHER = ENV["DITHER"] != "0"
|
|||||||
FORMAT = DITHER ? "png" : "webp"
|
FORMAT = DITHER ? "png" : "webp"
|
||||||
|
|
||||||
get "/*" do |path|
|
get "/*" do |path|
|
||||||
|
halt 404, {"Content-Type" => "text/plain"}, "not found" unless File.exist?("#{ROOT}/#{path}.enc")
|
||||||
|
|
||||||
content_type "image/#{FORMAT}"
|
content_type "image/#{FORMAT}"
|
||||||
|
|
||||||
geometry = params["geo"] unless params["geo"] == ""
|
geometry = params["geo"] unless params["geo"] == ""
|
||||||
|
|||||||
Reference in New Issue
Block a user