summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Lomax <lomax.on.the.run@gmail.com>2023-04-26 07:08:33 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-05-20 15:52:00 +0200
commit00f5d2d110712af84fae2c5f9183a2ea48ce0a4a (patch)
treefcfce5199b8e76bbc9b24d4d2db05f677de6da9e /docs
parentb43936f2ec37f47277899a91a5464091bd80ad3a (diff)
Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to work with async functions.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/clickjacking.txt10
-rw-r--r--docs/releases/5.0.txt10
-rw-r--r--docs/topics/async.txt3
3 files changed, 20 insertions, 3 deletions
diff --git a/docs/ref/clickjacking.txt b/docs/ref/clickjacking.txt
index f9bec591a7..3a81bdbdb0 100644
--- a/docs/ref/clickjacking.txt
+++ b/docs/ref/clickjacking.txt
@@ -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
===========
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index 0c093720b9..611a7bd68b 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -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
~~~~~
diff --git a/docs/topics/async.txt b/docs/topics/async.txt
index 769fac3c52..444c88a1c6 100644
--- a/docs/topics/async.txt
+++ b/docs/topics/async.txt
@@ -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::