GithubHelp home page GithubHelp logo

Problem with iPad Safari and https ? about helmet HOT 4 CLOSED

 avatar commented on July 21, 2024
Problem with iPad Safari and https ?

from helmet.

Comments (4)

evilpacket avatar evilpacket commented on July 21, 2024

Let me try this out in my playground env

cc-lam wrote:

In my app, I have the following policy:

helmet.csp.policy
defaultPolicy:
"img-src" : ['*']
"style-src" : ["'self'", "'unsafe-inline'", "fonts.googleapis.com"]
"script-src" : ["'self'", "cdnjs.cloudflare.com", "login.persona.org",
"ajax.googleapis.com", "www.google-analytics.com"
http://www.google-analytics.com%22]

This works well for all OS/browser combinations I'm testing, except
for mobile Safari on the iPad which refuses to load the script from
https://login.persona.org/include.js

The persona script is the only one delivered through https protocol.
Maybe this has something to do with this ?


Reply to this email directly or view it on GitHub
#8.

from helmet.

 avatar commented on July 21, 2024

Adding the https in the policy seems to fix it:

"script-src" : ["'self'", "cdnjs.cloudflare.com", "https://login.persona.org", "ajax.googleapis.com", "www.google-analytics.com"]

Is this the correct way to do it ? More generally, should we always add the protocols in the policy ?

from helmet.

evilpacket avatar evilpacket commented on July 21, 2024

cool. that's what I was hoping to try out. I don't know if it's best
practice or required to always add protocols but I think it would be
once best interest with CSP to be as specific as possible. Leaves less
up to interpretation. ndm has this to say
https://twitter.com/ndm/status/348894065586225152

Still probably best to be specific imho.

cc-lam wrote:

Adding the https in the policy seems to fix it:

"script-src" : ["'self'", "cdnjs.cloudflare.com",
"https://login.persona.org", "ajax.googleapis.com",
"www.google-analytics.com" http://www.google-analytics.com%22]

Is this the correct way to do it ? More generally, should we always
add the protocols in the policy ?


Reply to this email directly or view it on GitHub
#8 (comment).

from helmet.

 avatar commented on July 21, 2024

Thanks for the info.

from helmet.

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.