'Gets the value to set for the X_FRAME_OPTIONS header.
By default this uses the value from the X_FRAME_OPTIONS Django
settings. If not found in settings, defaults to \'SAMEORIGIN\'.
This method can be overridden if needed, allowing it to vary based on
the request or response.'

def get_xframe_options_value(self, request, response):

    return getattr(settings, 'X_FRAME_OPTIONS', 'SAMEORIGIN').upper()
