fix: Exclude embeddable from xframe options
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
from django.shortcuts import get_object_or_404, render
|
from django.shortcuts import get_object_or_404, render
|
||||||
|
from django.views.decorators.clickjacking import xframe_options_exempt
|
||||||
|
|
||||||
from fellchensammlung.aviews.helpers import headers
|
from fellchensammlung.aviews.helpers import headers
|
||||||
from fellchensammlung.models import RescueOrganization, AdoptionNotice, Species
|
from fellchensammlung.models import RescueOrganization, AdoptionNotice, Species
|
||||||
|
|
||||||
|
|
||||||
|
@xframe_options_exempt
|
||||||
@headers({"X-Robots-Tag": "noindex"})
|
@headers({"X-Robots-Tag": "noindex"})
|
||||||
def list_ans_per_rescue_organization(request, rescue_organization_id, species_slug=None):
|
def list_ans_per_rescue_organization(request, rescue_organization_id, species_slug=None):
|
||||||
expand = request.GET.get("expand")
|
expand = request.GET.get("expand")
|
||||||
@@ -20,4 +22,4 @@ def list_ans_per_rescue_organization(request, rescue_organization_id, species_sl
|
|||||||
adoption_notices = [adoption_notice for adoption_notice in ans_of_rescue_org if species in adoption_notice.species]
|
adoption_notices = [adoption_notice for adoption_notice in ans_of_rescue_org if species in adoption_notice.species]
|
||||||
|
|
||||||
template = 'fellchensammlung/embeddables/list-adoption-notices.html'
|
template = 'fellchensammlung/embeddables/list-adoption-notices.html'
|
||||||
return render(request, template, context={"adoption_notices": adoption_notices})
|
return render(request, template, context={"adoption_notices": adoption_notices, "expand": expand})
|
Reference in New Issue
Block a user