diff options
author | Magnus Hagander | 2021-09-15 20:08:12 +0000 |
---|---|---|
committer | Magnus Hagander | 2021-09-15 20:10:33 +0000 |
commit | 653a457c99b7d049663ea06e92d91b6761e1dc8b (patch) | |
tree | 0325d0436cedeae195a7b7925d1824b9de10643a /pgweb/docs/views.py | |
parent | 48bb7f5022856147173ecff7a687c96cdec9e25f (diff) |
Re-allow framing of images in docs
Commit fff74828 disallowed the loading of docs in frames, but apparently
svg images count as framing, so re-allow those.
We could limit it to specific URLs, but it's just images so it's good to
be able to load them from different places.
Discussion: https://postgr.es/m/CAH2-WzkpfQROHTx_F3RM6AUbxquxHy4QWXfVkNPWm3s9AFmtkg@mail.gmail.com
Diffstat (limited to 'pgweb/docs/views.py')
-rw-r--r-- | pgweb/docs/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pgweb/docs/views.py b/pgweb/docs/views.py index 236c5c73..9def7657 100644 --- a/pgweb/docs/views.py +++ b/pgweb/docs/views.py @@ -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, content_sources +from pgweb.util.decorators import login_required, content_sources, allow_frames from django.template.defaultfilters import strip_tags from django.db.models import Q from django.conf import settings @@ -150,6 +150,7 @@ 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 |