Oops, fix redirect to item thumbnail

This `.gif` format is used in the items list "export to petpage"
feature, as the image URL for items whose URLs are known to contain
blocked words that prevent them from being used in petpages.

But when doing some Rails upgrade long ago, we didn't notice the new
security feature that blocks redirects to other sites without a special
flag being set. It was triggering 500 errors, oops.

Now, we set the flag!
This commit is contained in:
Emi Matchu 2024-03-12 18:45:05 -07:00
parent 2cfcfaf69d
commit 3f172b91c5

View file

@ -86,7 +86,7 @@ class ItemsController < ApplicationController
format.gif do
expires_in 1.month
redirect_to @item.thumbnail_url
redirect_to @item.thumbnail_url, allow_other_host: true
end
end
end