From c6e012785a3f60120e8ef1a2d232e73845f22972 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 14 Aug 2021 00:34:21 -0700 Subject: [PATCH] Set appropriate response headers for RSS routes --- src/invidious/routes/feeds.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index 2c74f7eb..ef445f7f 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -137,6 +137,7 @@ module Invidious::Routes::Feeds def self.rss_channel(env) locale = LOCALES[env.get("preferences").as(Preferences).locale]? + env.response.headers["Content-Type"] = "application/atom+xml" env.response.content_type = "application/atom+xml" ucid = env.params.url["ucid"] @@ -208,6 +209,7 @@ module Invidious::Routes::Feeds def self.rss_private(env) locale = LOCALES[env.get("preferences").as(Preferences).locale]? + env.response.headers["Content-Type"] = "application/atom+xml" env.response.content_type = "application/atom+xml" token = env.params.query["token"]? @@ -251,6 +253,7 @@ module Invidious::Routes::Feeds def self.rss_playlist(env) locale = LOCALES[env.get("preferences").as(Preferences).locale]? + env.response.headers["Content-Type"] = "application/atom+xml" env.response.content_type = "application/atom+xml" plid = env.params.url["plid"]