From 255a8526e948bfbc1e6c37f0db38e4cee6854ae7 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 31 Oct 2022 08:44:01 -0400 Subject: [PATCH] Correct RSS endpoint content type (fixes #169) --- lib/philomena_web/controllers/api/rss/watched_controller.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/philomena_web/controllers/api/rss/watched_controller.ex b/lib/philomena_web/controllers/api/rss/watched_controller.ex index d1ab2d5e..6dbd84a4 100644 --- a/lib/philomena_web/controllers/api/rss/watched_controller.ex +++ b/lib/philomena_web/controllers/api/rss/watched_controller.ex @@ -13,6 +13,8 @@ defmodule PhilomenaWeb.Api.Rss.WatchedController do # NB: this is RSS, but using the RSS format causes Phoenix not to # escape HTML - render(conn, "index.html", layout: false, images: images) + conn + |> put_resp_header("content-type", "application/rss+xml") + |> render("index.html", layout: false, images: images) end end