diff options
author | Andrew Godwin | 2022-12-10 12:16:08 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-10 12:16:08 -0700 |
commit | 3595af7bd239f3843aff3ae06df8932cff23173d (patch) | |
tree | 84b8a0432fb89f253808be11275e2f78fc57bf42 /takahe/urls.py | |
parent | 9a978786d4eac0139b5606e22c605450adbe7a12 (diff) | |
download | takahe-3595af7bd239f3843aff3ae06df8932cff23173d.tar.gz takahe-3595af7bd239f3843aff3ae06df8932cff23173d.tar.bz2 takahe-3595af7bd239f3843aff3ae06df8932cff23173d.zip |
Media proxy, caching and tuning docs
Fixes #67
Diffstat (limited to 'takahe/urls.py')
-rw-r--r-- | takahe/urls.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/takahe/urls.py b/takahe/urls.py index 66f176d..98d1cd5 100644 --- a/takahe/urls.py +++ b/takahe/urls.py @@ -5,6 +5,7 @@ from django.views.static import serve from activities.views import compose, explore, follows, posts, search, timelines from core import views as core +from mediaproxy import views as mediaproxy from stator import views as stator from users.views import activitypub, admin, auth, identity, settings @@ -176,6 +177,22 @@ urlpatterns = [ core.FlatPage.as_view(title="Server Rules", config_option="policy_rules"), name="rules", ), + # Media/image proxy + path( + "proxy/identity_icon/<identity_id>/", + mediaproxy.IdentityIconCacheView.as_view(), + name="proxy_identity_icon", + ), + path( + "proxy/identity_image/<identity_id>/", + mediaproxy.IdentityImageCacheView.as_view(), + name="proxy_identity_image", + ), + path( + "proxy/post_attachment/<attachment_id>/", + mediaproxy.PostAttachmentCacheView.as_view(), + name="proxy_post_attachment", + ), # Well-known endpoints and system actor path(".well-known/webfinger", activitypub.Webfinger.as_view()), path(".well-known/host-meta", activitypub.HostMeta.as_view()), |