Opened 2 years ago

Last modified 2 years ago

#34048 closed Cleanup/optimization

Do not add cache control header if is set to false or a falsy value — at Version 2

Reported by: Wiktor Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords: cache control
Cc: Wiktor, Jan Urban, Flavio Curella Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Wiktor)

Currently when one sets no_cache to a falsy value, e.g.:

@cache_control(no_cache=False)
def some_view()
    pass

Cache-Control header will be set to no_cache=False.

This might be confusing and might lead to a security issue.

Instead it should be just excluded.

Change History (2)

comment:2 by Wiktor, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top