diff options
author | TAKAHASHI Shuuji | 2022-12-16 02:31:25 +0900 |
---|---|---|
committer | GitHub | 2022-12-15 10:31:25 -0700 |
commit | 61fbda0ebf8b1ca7f6ac7d8515b1bd49690f48ab (patch) | |
tree | 60b0a2a87279f02b5f381b8a73c1132f97a4aca1 /takahe | |
parent | 2131b40ce078f2e80b6e8816a2ca6978b0b5842f (diff) | |
download | takahe-61fbda0ebf8b1ca7f6ac7d8515b1bd49690f48ab.tar.gz takahe-61fbda0ebf8b1ca7f6ac7d8515b1bd49690f48ab.tar.bz2 takahe-61fbda0ebf8b1ca7f6ac7d8515b1bd49690f48ab.zip |
Set the correct `Content-Type` header for static WebP images (#171)
Diffstat (limited to 'takahe')
-rw-r--r-- | takahe/urls.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/takahe/urls.py b/takahe/urls.py index d6d893f..dfdf4da 100644 --- a/takahe/urls.py +++ b/takahe/urls.py @@ -1,7 +1,6 @@ from django.conf import settings as djsettings from django.contrib import admin as djadmin from django.urls import path, re_path -from django.views.static import serve from activities.views import compose, explore, follows, posts, search, timelines from api.views import api_router, oauth @@ -219,7 +218,7 @@ urlpatterns = [ # Media files re_path( r"^media/(?P<path>.*)$", - serve, + core.custom_static_serve, kwargs={"document_root": djsettings.MEDIA_ROOT}, ), ] |