Skip to content

Commit 07a4fa6

Browse files
authored
Allauth: add 429 handler (#11639)
Allauth expects a handler429 view in urls.py, or a 429.html template in the root of the templates directory. We don't want to create symlinks, so a custom handler429 view is added. Ref https://read-the-docs.sentry.io/issues/5835964680/?project=161479&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=19
1 parent 23780b9 commit 07a4fa6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

readthedocs/urls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
handler403 = ErrorView.as_view(status_code=403)
1818
handler404 = ErrorView.as_view(status_code=404)
1919
handler500 = ErrorView.as_view(status_code=500)
20+
# Rate limit handler for allauth views,
21+
# this isn't a Django built-in handler.
22+
# https://docs.allauth.org/en/latest/account/rate_limits.html.
23+
handler429 = ErrorView.as_view(status_code=429)
2024

2125
basic_urls = [
2226
path("", HomepageView.as_view(), name="homepage"),

0 commit comments

Comments
 (0)