From 4bc8fab4f52ca78f3327b352eb1e8b26e88b4893 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 26 Dec 2018 06:19:45 -0500 Subject: [PATCH] Allow translators to specify that attachment URLs shouldn't be proxied Translators can include `proxy: false` in the attachment object to indicate that the URL should be used as is, without further proxying. This generally isn't necessary, but sometimes it is (e.g., on EBSCOhost), and in theory we should start using this whenever a PDF URL is extracted from the page instead of being constructed manually by the translator. Closes #1612 --- chrome/content/zotero/xpcom/translation/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 0e8df5c829..5b0e2a7f99 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -771,7 +771,7 @@ Zotero.Translate.Sandbox = { delete attachment.path; } - if(attachment.url) { + if (attachment.url && attachment.proxy !== false) { // Remap attachment (but not link) URLs // TODO: provide both proxied and un-proxied URLs (also for documents) // because whether the attachment is attached as link or file