Skip to content

Commit 3316684

Browse files
committed
document async clickjacking middleware
1 parent 5272b94 commit 3316684

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AsyncXFrameOptionsMiddleware
2+
3+
it works exactly like django's [XFrameOptionsMiddleware](https://docs.djangoproject.com/en/5.1/ref/middleware/#x-frame-options-middleware)
4+
except that it's fully async
5+
6+
### Usage:
7+
remove django's `django.middleware.clickjacking.XFrameOptionsMiddleware` from the `MIDDLEWARE` setting and add
8+
`django_async_extensions.middleware.clickjacking.AsyncXFrameOptionsMiddleware` in it's place.
9+
10+
**note**: this middleware like other middlewares provided in this package can work alongside sync middlewares, and can handle sync views.

0 commit comments

Comments
 (0)