📜  允许 x_frame_options django - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:45.842000             🧑  作者: Mango

代码示例2
from django.http import HttpResponse
from django.views.decorators.clickjacking import xframe_options_exempt

@xframe_options_exempt
def ok_to_load_in_a_frame(request):
    return HttpResponse("This page is safe to load in a frame on any site.")