logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 7651290e2be72ed35d7582757251eb151fdce953
parent: d8512bf6eb263114561f61bc9e053497da5c69bf
Author: lambda <pleromagit@rogerbraun.net>
Date:   Sun, 20 Jan 2019 10:26:20 +0000

Merge branch 'referrer-caching-fix' into 'develop'

Don't use referrerpolicy with media proxy.

See merge request pleroma/pleroma-fe!467

Diffstat:

Msrc/components/attachment/attachment.js3+++
Msrc/components/attachment/attachment.vue2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js @@ -24,6 +24,9 @@ const Attachment = { StillImage }, computed: { + referrerpolicy () { + return this.$store.state.instance.mediaProxyAvailable ? '' : 'no-referrer' + }, type () { return fileTypeService.fileType(this.attachment.mimetype) }, diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue @@ -10,7 +10,7 @@ <a href="#" @click.prevent="toggleHidden()">Hide</a> </div> <a v-if="type === 'image' && (!hidden || preloadImage)" class="image-attachment" :class="{'hidden': hidden && preloadImage}" :href="attachment.url" target="_blank" :title="attachment.description"> - <StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/> + <StillImage :class="{'small': isSmall}" :referrerpolicy="referrerPolicy" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/> </a> <video :class="{'small': isSmall}" v-if="type === 'video' && !hidden" @loadeddata="onVideoDataLoad" :src="attachment.url" controls :loop="loopVideo" playsinline></video>