I may wish to retain that but also have a sensitive view that opts-out of
that behavior, to avoid it being revealed in a potential URL enumeration.
I propose adjusting `CommonMiddleware` to detect a `_should_append_slash`
boolean attribute on the view itself, to allow such an opt-out.
--
Ticket URL: <https://code.djangoproject.com/ticket/32124>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Carlton Gibson
* status: new => assigned
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13575 PR]
Related to #31747
--
Ticket URL: <https://code.djangoproject.com/ticket/32124#comment:1>
* stage: Unreviewed => Accepted
Comment:
Agreed. I would use `should_append_slash` (without a leading underscore)
and probably add and document only a view decorator (similar to
`csrf_exempt()`).
--
Ticket URL: <https://code.djangoproject.com/ticket/32124#comment:2>
Comment (by Carlton Gibson):
> I would use `should_append_slash`
No problem. I had in mind `do_not_call_in_templates` (but, looking it up,
it doesn't have an underscore.)
--
Ticket URL: <https://code.djangoproject.com/ticket/32124#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"ad11f5b8c9cbfdb763e08c83170694abc0c5fc1e" ad11f5b8]:
{{{
#!CommitTicketReference repository=""
revision="ad11f5b8c9cbfdb763e08c83170694abc0c5fc1e"
Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32124#comment:4>