Comments (7)
Yeah the origin is indeed an authentication header.
However I can fetch the manifest beforehand without any issues.
That is how I stranded here with my insights
I would need to look into the service worker to intercept specific requests made by UV.
That is currently outside of my current knowledge.
Again thanks for the quick responses!
from user-stories.
Can you use a data:
URI for the manifest? i.e. Base64-encode the JSON and stick data:application/json;base64,
on the front of it? I don't know if UV is able to handle the data:
URI scheme, but if not, it would probably not be hard to add, and it seems to me it would be a nicely standards-compliant way to load such data into UV.
from user-stories.
I have been looking in to something like this.
However in IIIFContentHandler.ts#L295 UV uses manifold. Looking in to them I see on @iiif/manifold/src/Bootstrapper.ts#L45 that the manifest is loaded in to the _loaded
function witch is private. I think we might need to open the feature request there.
However I will not be doing that due to the lack of my understanding of UV
Where we then can potentially use it something like this:
import { loadManifest, IManifoldOptions } from "@iiif/manifold";
await loadManifest({
manifestData: data.iiifManifestData, // comming from the options then in UV
collectionIndex: data.collectionIndex,
manifestIndex: data.manifestIndex || 0,
canvasId: data.canvasId,
canvasIndex: data.canvasIndex || 0,
rangeId: data.rangeId,
locale: data.locales ? data.locales[0].name : undefined,
} as IManifoldOptions)
from user-stories.
@TessavWalstijn, did you try @Conal-Tuohy's suggestion of using a data URI to carry the manifest? I haven't had time to try this myself, but a quick investigation suggests to me that there's a good chance it will work. The manifold Bootstrapper is being fed by the manifesto Utils.loadManifest method, which uses fetch()
to retrieve the data. As far as I can tell, fetch()
should support data URIs.
from user-stories.
Yes I have tried the solution of @Conal-Tuohy
Also thanks for the really quick response!
However I keep getting the alert
Unable to load manifest
For more context my Stack Overflow question might be helpful
However my second proposal in that question would be a new feature request I think (being able to add headers to the requests UV does).
Sadly I do not have the capacity in this moment to create a minimal reproducible repository.
from user-stories.
I have had mixed success with data: URIs: some have worked and others cause UV to throw an exception in obfuscated JavaScript which I'm not going to attempt to decode. Perhaps the length of the URI exceeds some expectation in the code somewhere? Because a data: URI is by definition longer than the content of the manifest itself, there's no upper limit to its length. I am just guessing that length is the issue, but if so it might be preferable to use a blob: URI which would be a lot shorter.
from user-stories.
For more context my Stack Overflow question might be helpful
However my second proposal in that question would be a new feature request I think (being able to add headers to the requests UV does).
Having read your Stack Overflow post, I now see that your use case is different to the one originally raised in this issue:
it's actually about authentication is it not?
A Service Worker might be a good way to intercept and authenticate the HTTPS requests made by UV
from user-stories.
Related Issues (20)
- View search results of generated text
- View highlighted search results
- View a modern interpretation of the generated text
- Accessible display of generated text
- Copy generated text
- Download generated text
- View options for text and/or image display
- Clickable links within the generated text HOT 2
- View information from an external source
- View citation source
- Cite text
- Adjust text size
- Swap text colour and background HOT 1
- View copyright status HOT 2
- Handle long texts
- Transcript Source Formats HOT 2
- Support text display at both page and document/sequence levels HOT 1
- display attribution and license data of canvases in metadata panel
- Title attribute for thumbnails in contents pane
- Disable certain unused modules on build HOT 2
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 user-stories.