mediaproxy: proxy network-path references
Discovered-by: snow Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/900 (cherry picked from commit bbf974adc82d09a2099fb1234729131929307911)
This commit is contained in:
parent
c2bdfb6a34
commit
5cd6894a66
4 changed files with 63 additions and 1 deletions
|
|
@ -17,6 +17,10 @@ defmodule Pleroma.HTML.Transform.MediaProxy do
|
|||
{"src", media_url}
|
||||
end
|
||||
|
||||
def scrub_attribute(:img, {"src", "//" <> target}) do
|
||||
scrub_attribute(:img, {"src", "https://" <> target})
|
||||
end
|
||||
|
||||
def scrub_attribute(_tag, attribute), do: attribute
|
||||
|
||||
def scrub({:img, attributes, children}) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue