From 39129f5da7c3aa1a2041cc2b813838bb41fd3a60 Mon Sep 17 00:00:00 2001 From: Tyler Kennedy Date: Sun, 21 Apr 2024 18:25:53 -0400 Subject: [PATCH] Make slash on OAuth endpoints optional to handle clients that cannot follow redirects. (#670) --- takahe/urls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/takahe/urls.py b/takahe/urls.py index cb833ae..e6c8dc1 100644 --- a/takahe/urls.py +++ b/takahe/urls.py @@ -344,9 +344,9 @@ urlpatterns = [ path("inbox/", activitypub.Inbox.as_view(), name="shared_inbox"), # API/Oauth path("api/", include("api.urls")), - path("oauth/authorize", oauth.AuthorizationView.as_view()), - path("oauth/token", oauth.TokenView.as_view()), - path("oauth/revoke", oauth.RevokeTokenView.as_view()), + re_path(r"oauth/authorize/?$", oauth.AuthorizationView.as_view()), + re_path(r"oauth/token/?$", oauth.TokenView.as_view()), + re_path(r"oauth/revoke/?$", oauth.RevokeTokenView.as_view()), # Stator path(".stator/", stator.RequestRunner.as_view()), # Django admin