mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to work with async functions.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b43936f2ec
commit
00f5d2d110
@@ -90,6 +90,11 @@ that tells the middleware not to set the header::
|
||||
iframe, you may need to modify the :setting:`CSRF_COOKIE_SAMESITE` or
|
||||
:setting:`SESSION_COOKIE_SAMESITE` settings.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added to the
|
||||
``@xframe_options_exempt`` decorator.
|
||||
|
||||
Setting ``X-Frame-Options`` per view
|
||||
------------------------------------
|
||||
|
||||
@@ -113,6 +118,11 @@ decorators::
|
||||
Note that you can use the decorators in conjunction with the middleware. Use of
|
||||
a decorator overrides the middleware.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added to the
|
||||
``@xframe_options_deny`` and ``@xframe_options_sameorigin`` decorators.
|
||||
|
||||
Limitations
|
||||
===========
|
||||
|
||||
|
||||
@@ -233,9 +233,13 @@ CSRF
|
||||
Decorators
|
||||
~~~~~~~~~~
|
||||
|
||||
* The :func:`~django.views.decorators.cache.cache_control` and
|
||||
:func:`~django.views.decorators.cache.never_cache` decorators now support
|
||||
wrapping asynchronous view functions.
|
||||
* The following decorators now support wrapping asynchronous view functions:
|
||||
|
||||
* :func:`~django.views.decorators.cache.cache_control`
|
||||
* :func:`~django.views.decorators.cache.never_cache`
|
||||
* ``xframe_options_deny()``
|
||||
* ``xframe_options_sameorigin()``
|
||||
* ``xframe_options_exempt()``
|
||||
|
||||
Email
|
||||
~~~~~
|
||||
|
||||
@@ -83,6 +83,9 @@ view functions:
|
||||
|
||||
* :func:`~django.views.decorators.cache.cache_control`
|
||||
* :func:`~django.views.decorators.cache.never_cache`
|
||||
* ``xframe_options_deny()``
|
||||
* ``xframe_options_sameorigin()``
|
||||
* ``xframe_options_exempt()``
|
||||
|
||||
For example::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user