move opml route behind basic auth until proper solution is implemented

This commit is contained in:
robs 2024-12-30 19:46:25 +01:00
parent 246ca3b299
commit 886d1c37ff

View file

@ -23,12 +23,20 @@ defmodule PinchflatWeb.Router do
plug :maybe_basic_auth
end
pipeline :protected_feeds do
plug :basic_auth
end
scope "/", PinchflatWeb do
pipe_through :protected_feeds
# has to match before /sources/:id
get "/sources/opml", Podcasts.PodcastController, :opml_feed
end
# Routes in here _may not be_ protected by basic auth. This is necessary for
# media streaming to work for RSS podcast feeds.
scope "/", PinchflatWeb do
pipe_through :feeds
# has to match before /sources/:id
get "/sources/opml", Podcasts.PodcastController, :opml_feed
get "/sources/:uuid/feed", Podcasts.PodcastController, :rss_feed
get "/sources/:uuid/feed_image", Podcasts.PodcastController, :feed_image