class documentation
class XFrameOptionsMiddleware(MiddlewareMixin): (source)
Set the X-Frame-Options HTTP header in HTTP responses. Do not set the header if it's already set or if the response contains a xframe_options_exempt value set to True. By default, set the X-Frame-Options header to 'DENY', meaning the response cannot be displayed in a frame, regardless of the site attempting to do so. To enable the response to be loaded on a frame within the same site, set X_FRAME_OPTIONS in your project's Django settings to 'SAMEORIGIN'.
Method | get |
Get the value to set for the X_FRAME_OPTIONS header. Use the value from the X_FRAME_OPTIONS setting, or 'DENY' if not set. |
Method | process |
Undocumented |
Inherited from MiddlewareMixin
:
Async Method | __acall__ |
Async version of __call__ that is swapped in when an async request is running. |
Method | __call__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Class Variable | async |
Undocumented |
Class Variable | sync |
Undocumented |
Instance Variable | get |
Undocumented |
Method | _async |
If get_response is a coroutine function, turns us into async mode so a thread is not consumed during a whole request. |
Instance Variable | _is |
Undocumented |