From d5b3b90202b4b48924647cea866e1429b15bdfef Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 1 Jan 2022 22:17:44 +0700 Subject: [PATCH] fix missing auth of search, reduce nginx alias to relevant paths only --- nginx.conf | 12 ++++++++++-- tubearchivist/home/urls.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index 6dcc568..7d8421f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,8 +2,16 @@ server { listen 8000; - location /cache/ { - alias /cache/; + location /cache/videos/ { + alias /cache/videos/; + } + + location /cache/channels/ { + alias /cache/channels/; + } + + location /cache/playlists/ { + alias /cache/playlists/; } location /media/ { diff --git a/tubearchivist/home/urls.py b/tubearchivist/home/urls.py index f7acf3e..972e4a5 100644 --- a/tubearchivist/home/urls.py +++ b/tubearchivist/home/urls.py @@ -53,5 +53,5 @@ urlpatterns = [ login_required(PlaylistIdView.as_view()), name="playlist_id", ), - path("search/", SearchView.as_view(), name="search"), + path("search/", login_required(SearchView.as_view()), name="search"), ]