1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #25017 -- Allowed customizing the DISALLOWED_USER_AGENTS response

This commit is contained in:
sujayskumar
2015-06-24 15:41:43 +05:30
committed by Tim Graham
parent a50b66da30
commit 2e70bf3785
3 changed files with 11 additions and 10 deletions

View File

@@ -452,6 +452,12 @@ Requests and Responses
<django.http.HttpRequest.urlconf>` to ``None`` to revert any changes made
by previous middleware and return to using the :setting:`ROOT_URLCONF`.
* The :setting:`DISALLOWED_USER_AGENTS` check in
:class:`~django.middleware.common.CommonMiddleware` now raises a
:class:`~django.core.exceptions.PermissionDenied` exception as opposed to
returning an :class:`~django.http.HttpResponseForbidden` so that
:data:`~django.conf.urls.handler403` is invoked.
Tests
^^^^^