davideisinger.com

My personal website
Log | Files | Refs | README

commit bf5238dd56b6dfe9ee2f1d629d017b2075750663
parent ec8e8b91d4566fbfbbc6f0f06b34ddf2185da23e
Author: David Eisinger <[email protected]>
Date:   Sun,  4 Feb 2024 15:41:42 -0500

Check for file before decrypt/dither

Diffstat:
Mbin/dither/dither.rb | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/dither/dither.rb b/bin/dither/dither.rb @@ -9,6 +9,8 @@ DITHER = ENV["DITHER"] != "0" FORMAT = DITHER ? "png" : "webp" get "/*" do |path| + halt 404, {"Content-Type" => "text/plain"}, "not found" unless File.exist?("#{ROOT}/#{path}.enc") + content_type "image/#{FORMAT}" geometry = params["geo"] unless params["geo"] == ""