Code Monkey home page Code Monkey logo

Comments (6)

JDillon522 avatar JDillon522 commented on June 11, 2024

I have the same issue with Ember-fire:

[Report Only] Refused to load the script 'https://cdn.firebase.com/js/client/2.0.5/firebase.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost:35729 0.0.0.0:35729".

[Report Only] Refused to load the script 'https://cdn.firebase.com/libs/emberfire/1.3.1/emberfire.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost:35729 0.0.0.0:35729".

from ember-cli-content-security-policy.

unwiredbrain avatar unwiredbrain commented on June 11, 2024

@mankind I believe the problem is that you're using an URL instead of just the scheme plus the FQDN.

https://api.stripe.com/v1 should really be https://api.stripe.com

Take a look at this: http://content-security-policy.com/#source_list

Hope this helps

@JDillon522 could you post the relevant portion of your config/environment.js, please?

from ember-cli-content-security-policy.

JDillon522 avatar JDillon522 commented on June 11, 2024

I eventually got it working by doing:

contentSecurityPolicy: {
    'default-src': "'none'",
    'script-src': "'self' 'unsafe-eval' https://cdn.firebase.com/ ",
    'font-src': "'self'",
    'connect-src': "'self'",
    'img-src': "'self'",
    'style-src': "'self'",
    'media-src': "'self'"
  }

Sadly for this thread, I ended up totally rebooting that project and going about things a different way. So I cant offer much else.

from ember-cli-content-security-policy.

unwiredbrain avatar unwiredbrain commented on June 11, 2024

@JDillon522 that looks like the correct approach, though.

from ember-cli-content-security-policy.

wolfbiter avatar wolfbiter commented on June 11, 2024

solution here for anyone who finds this: FirebaseExtended/emberfire#175

from ember-cli-content-security-policy.

sandstrom avatar sandstrom commented on June 11, 2024

I think this issue can be closed. @mankind do you mind closing?

from ember-cli-content-security-policy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.