Comments (4)
Thank you. I was able to reproduce and fix the issue in SingleFile. The fix will be available in the next version.
You will have to adapt the code on your end. The fetch
function passed as parameter here https://github.com/zotero/zotero-connectors/blob/d3b870f525137c79a567398b668b87ee19d60fb7/src/common/singlefile.js#L60 should try to fetch the resource via a script injected into the page (i.e. hostFetch
in SingleFile, window.wrappedJSObject.fetch
might work in Firefox). This script has to fetch the resource from the page itself and outside the extension world. This allows keeping the referrer
and origin
HTTP header values unchanged (this is the cause of the issue).
from singlefile.
Actually simply passing the option referrerPolicy: "strict-origin-when-cross-origin"
to fetch
might be sufficient. FYI, the latest version of single-file-core
(v1.5.2
) adds this option automatically when calling fetch
.
from singlefile.
I've updated SF in the Connector to the latest version which uses referrerPolicy: "strict-origin-when-cross-origin"
, but it did not help neither in Firefox, nor in Chrome. Are you sure it works without sending the correct referrer?
from singlefile.
Yes, I'm sure it works but for that I have to call fetch
outside the content script, in the page itself. You should just have to adapt the code below.
SingleFile/src/lib/single-file/fetch/content/content-fetch.js
Lines 96 to 138 in dc9d100
This code interacts with the following code in single-file-core
.
from singlefile.
Related Issues (20)
- Images (full-sized) not fully captured on eBay listing HOT 1
- Auto save on tab removal HOT 3
- Unable to edit page on mzh.moegirl.org.cn, blank in annotation editor with `Content Security Policy` errors (but open success, saved with smaller size) HOT 2
- Saving with Zip format (including SingleFileZ) fails to save some elements HOT 1
- The `white-space` attr will be removed after saving in Safari HOT 3
- Ability to run SingleFile within a Playwright context HOT 1
- Underlining of text HOT 1
- 保存网页后,本地html文件无法正常显示网页内容 HOT 3
- Re-save a folder as a self-extracting zip html file HOT 3
- This url is not being saved: http://dewbell.biz/en/products/water-pipe-love HOT 10
- SingelFile does not work on Android Microsoft Edge at all HOT 4
- Some tab / button trigger by js not working HOT 3
- feature request: debug log traces to be monitored in console HOT 4
- I'm bit confused about help page HOT 1
- Why can't I click this button,i want debug the crx! HOT 1
- ebay capture doesn't save all images HOT 1
- SingleFile freezes when saving with Zotero Connector enabled HOT 9
- Freeze on a Japanese website HOT 1
- 有些网址无法下载图片 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from singlefile.