Disallow framing of the documentation pages
authorMagnus Hagander <magnus@hagander.net>
Fri, 20 Aug 2021 12:43:59 +0000 (14:43 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 20 Aug 2021 12:43:59 +0000 (14:43 +0200)
We previously had an exception on the documentation pages, because
pgadmin4 used to load them in an iframe. This is no longer the case and
hasn't been for a while, so remove the exception.

Confirmed "shuold be ok" by Dave Page :)

pgweb/docs/views.py

index 34033e329cb97445170a9497314f88121a14e83e..236c5c7314b8fb6ab597a16686b8ca74de8a41f6 100644 (file)
@@ -1,7 +1,7 @@
 from django.shortcuts import render, get_object_or_404
 from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect, HttpResponseNotFound
 from django.http import HttpResponse, Http404
-from pgweb.util.decorators import login_required, allow_frames, content_sources
+from pgweb.util.decorators import login_required, content_sources
 from django.template.defaultfilters import strip_tags
 from django.db.models import Q
 from django.conf import settings
@@ -27,7 +27,6 @@ def _versioned_404(msg, version):
     return r
 
 
-@allow_frames
 @content_sources('style', "'unsafe-inline'")
 def docpage(request, version, filename):
     loaddate = None
@@ -151,7 +150,6 @@ def docpage(request, version, filename):
     return r
 
 
-@allow_frames
 def docsvg(request, version, filename):
     if version == 'current':
         ver = Version.objects.filter(current=True)[0].tree