From 27e5f68fbb7ef94587b6cd7f5b09354bf88d5f9a Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 7 Mar 2026 18:16:50 +0000 Subject: [PATCH] Skip Sobelow XSS.ContentType warning for asset controller --- lib/music_library_web/controllers/asset_controller.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/music_library_web/controllers/asset_controller.ex b/lib/music_library_web/controllers/asset_controller.ex index 261f933f..222e14dc 100644 --- a/lib/music_library_web/controllers/asset_controller.ex +++ b/lib/music_library_web/controllers/asset_controller.ex @@ -73,6 +73,9 @@ defmodule MusicLibraryWeb.AssetController do |> send_resp(304, "") end + # Format is always resolved to either "image/webp" or "image/jpeg" in + # pick_format/1, so it's safe. + # sobelow_skip ["XSS.ContentType"] defp respond_with_cache(conn, data, format, etag) do conn |> put_resp_content_type(format, "utf-8")