Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Fix library-view image previews when web_root is active (close #909)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Mar 27, 2018
1 parent 6462408 commit 72fcbc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/background-process/protocols/dat.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async function datProtocol (request, respond) {
// abort if we've already found it
if (entry) return
// apply the web_root config
if (manifest && manifest.web_root) {
if (manifest && manifest.web_root && !urlp.query.disable_web_root) {
if (path) {
path = joinPaths(manifest.web_root, path)
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/builtin-pages/com/file-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function render (fileNode) {

// now check for media formats
const mimetype = mime.lookup(fileNode.name)
const url = fileNode.url + '?cache-buster=' + Date.now()
const url = fileNode.url + '?cache-buster=' + Date.now() + '&disable_web_root=1'

if (mimetype.startsWith('image/')) {
return yo`<img src=${url} />`
Expand Down

0 comments on commit 72fcbc4

Please sign in to comment.