Set appropriate response headers for RSS routes

This commit is contained in:
syeopite 2021-08-14 00:34:21 -07:00
parent b37c8b0153
commit c6e012785a
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

View File

@ -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"]