feat: browser cache directives

This commit is contained in:
Ramires Viana
2021-04-19 12:49:40 +00:00
parent 603203848a
commit 190cb99a79
10 changed files with 41 additions and 11 deletions

View File

@@ -414,7 +414,7 @@ export default {
window.removeEventListener("scroll", this.scrollEvent);
window.removeEventListener("resize", this.windowsResize);
if (!this.user.perm.create) return;
if (this.user && !this.user.perm.create) return;
document.removeEventListener("dragover", this.preventDefault);
document.removeEventListener("dragenter", this.dragEnter);
document.removeEventListener("dragleave", this.dragLeave);

View File

@@ -175,11 +175,9 @@ export default {
if (this.req.type === "image" && !this.fullSize) {
return `${baseURL}/api/preview/big${url.encodePath(
this.req.path
)}?auth=${this.jwt}&k=${key}`;
)}?k=${key}`;
}
return `${baseURL}/api/raw${url.encodePath(this.req.path)}?auth=${
this.jwt
}&k=${key}`;
return `${baseURL}/api/raw${url.encodePath(this.req.path)}?k=${key}`;
},
raw() {
return `${this.previewUrl}&inline=true`;
@@ -257,7 +255,7 @@ export default {
if (this.req.subtitles) {
this.subtitles = this.req.subtitles.map(
(sub) => `${baseURL}/api/raw${sub}?auth=${this.jwt}&inline=true`
(sub) => `${baseURL}/api/raw${sub}?inline=true`
);
}