Comments (6)
Set
image.crossOrigin = 'anonymous';
to
image.crossOrigin = 'use-credentials';
in cornerstoneWebImageLoader.js
from cornerstonewebimageloader.
I just modified cornerstoneWebImageLoader to use XHR to load images and included a mechanism to configure a beforeSend callback so you can modify XHR as needed (e.g. to add auth headers). See the example on how to use this.
Please close this issue if it meets your needs
from cornerstonewebimageloader.
Chafey
I think the Image() constructor does not respect the Same-origin policy however xmlhttprequest does. (unless server permits it ... with the needed configuration changes.)
Am i allowed to suggest a duo solution, or am i missing out on some information?
from cornerstonewebimageloader.
You are free to suggest anything! Are you saying that you need the less secure CORS bypassing feature of Image()?
from cornerstonewebimageloader.
Personally: no, I use a reverse proxy for the collection of image resources because we want to audit and control everything that happens on top of the vendor provided image archives.
In the past I've seen Image() being used to bypass same-origin policy for viewing server side rendered dicom, I'd figure other people would like to make use of it too.
Anyway perhaps this is outside the scope of this small plugin. I'll suggest a patch that allows the unsafe Image() constructor in parallel with the xmlhttprequest and lets see if people like it or not.
Thanks for your contributions Chafey, I really enjoy your liberary, i feel guilty that my work|life currently doesn't permit me to spend too much time to help out with the tools. I hope to improve this in the future.
from cornerstonewebimageloader.
Personally I think the library should default to safe and secure behavior and should not use Image() at all. If someone wants to bypass CORS, they can make their own image loader.
Please don't feel guilty at all - the fact that it is being used and people appreciate it is highly satisfying. I hope you can find time to contribute in the future so you can experience the same satisfaction I do!
from cornerstonewebimageloader.
Related Issues (20)
- ment
- 0.7.2 tag should be deleted HOT 1
- Add loadFileRequest and fileManager infrastructure HOT 2
- issues when loading a png (corruption?) HOT 2
- Associating image metaData HOT 2
- Readme includes instructions for building/running w/ Grunt, but project appears to use webpack HOT 1
- Package import issue HOT 4
- Cannot display PNG image HOT 4
- Loading from relative paths HOT 4
- 404 of cornerstoneWebImageLoader HOT 3
- Applying Filters on Images loaded HOT 1
- wen WebImageLoader wwwc not correct work HOT 1
- metaDataProvider imagePlaneModule get pixelSpacing
- Remove reference to dist/ from readme.md HOT 2
- Unable to load static jpeg image HOT 10
- Reference line functionality not working
- can this work with cornerstoneTools 4.x.x
- PNG colormap example
- IE 11 InvalidStateError when setting xhr.responseType.
- Version Issue HOT 4
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 cornerstonewebimageloader.