Comments (11)
Can be manually fixed by site authors:
p.s. I fixed the security problem by avoiding @import and setting a header in PHP:
header('Access-Control-Allow-Origin:*');
then adding the crossorigin attribute to the<link crossorigin="use-credentials"
respectively setting it in the .htaccess
file.
We should still try to fix this in our script or it needs to be documented but this is the short fix.
ccing @mattbbp
from object-fit.
I researched a bit more and found out we could only fix this by circumventing the CSSOM CORS. This is a massive hack which I don’t think should land in our codebase as it has too many side effects.
Therefore I’ll rename the issue as it only needs to be documented.
from object-fit.
Hi! I receive "SecurityError: The operation is insecure." even though i'm bundling polyfill.object-fit.js
with a relative URL.
Is there something i can do to solve it?
from object-fit.
Is there any SSL involved or a different port / host?
from object-fit.
No SSL.
The web server is running in a virtualbox, serving all assets locally (i. e. with relative paths). I'm opening it in browser as http://foo:3000
.
from object-fit.
PS Firefox.
from object-fit.
So, are you using Webfonts that are from a 3rd party, by chance? Somewhere there must be another host / protocol involded to trigger this issue as far as I know. It’s very annoying but this these are the circumstances we’re dealing with when using JS (and we can’t use anything else here) nowadays for such stuff.
from object-fit.
I do use web fonts served from an external URL. I thought only the fitted images are concerned...
from object-fit.
Okay, then this is the issue. Unfortunately, as the polyfill needs to read out your computed CSS it does exactly that. And this means all inherited properties and values, such as fonts as well. I’m not sure if that is somehow avoidable, I have a look at this specific GetMatchedCSSRules.js
anyways as it causes major problems and performance issues as well.
from object-fit.
By the way this should not affect your live setup when protocols and ports match (=non mixed content, so HTTP or HTTPS only).
from object-fit.
I had a similar problem like @lolmaus (I was using typekit)
I solved adding this code inside getSheetRules():
if (stylesheet.href && stylesheet.href.match(/typekit/)) {
return [];
}
from object-fit.
Related Issues (20)
- Initialise polyfill repeatedly HOT 8
- Firefox 17.0.6 script not responding HOT 4
- Does this also work with videos? HOT 12
- Use external polyfills HOT 16
- IE11 crashes because of css crawling HOT 1
- Issues with object-fit: cover and html5 videos on Project Spartan/Microsoft Edge browser HOT 1
- Can you use multiple css selectors? HOT 4
- Does not respond to height set inside media queries. HOT 4
- IE9 not working HOT 1
- Doesn't seem to work as expected HOT 2
- Missing 'scale-down`
- Not working in IE11 HOT 8
- Not working in Firefox 35 HOT 1
- Object-fit replaces classes on image HOT 5
- Tests not working in IE9 HOT 1
- Not working in Microsoft Edge HOT 2
- Doesn't work? HOT 1
- Warn developers about usage HOT 3
- Drop auto-detection for explicit usage HOT 3
- Alternative fallback HOT 5
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 object-fit.