-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content security policy violation #33
Comments
@musaffa I've mostly turned off CSP in my Ember apps, but do you have a good suggestion for how to handle this? |
The addon may need a rewrite or |
@musaffa do you have any interest in doing a PR for either:
or
|
Sure. I will look into it. |
@joshsmith The current implementation heavily relies on inline scripting as it returns a script tag using I've ended up with a much simpler manual implementation: // application/route.js
actions: {
loading(transition) {
this._super(...arguments);
Pace.start();
transition.promise.finally(function() {
Pace.stop();
});
}
} I've then imported Configuration options can also be inserted into Pace like |
Is there really no way in CSPs to be able to specify a particular inline script being injected like this one? I unfortunately do not have time personally right now to put forth such a massive rewrite (and others probably would want something to say about that), but I'd be happy to see a PR if you wanted to attempt a major version bump branch. |
Nonce and SHA hash are ways to do this job. But their implementations can be a bit difficult. My custom implementation is way simpler and does the job that I need. I will need to see if the code can be extracted for the addon. |
@musaffa you're a 🍑 ! Thanks for looking into it. |
@musaffa Thanks a lot dude, you saved my day |
@musaffa any luck on being able to extract out for the addon? |
@joshsmith Not yet. |
This line requires inline script execution in production mode and shows error in the browser console. The error can be silenced by enabling 'unsafe-inline' to
script-src
in content security policy but this will make the whole application unsafe.The text was updated successfully, but these errors were encountered: