Giter Site home page Giter Site logo

foundeo / content-security-policy.com Goto Github PK

View Code? Open in Web Editor NEW
187.0 11.0 44.0 435 KB

Source code for the content-security-policy.com website

Home Page: https://content-security-policy.com/

License: GNU General Public License v3.0

CSS 0.62% HTML 96.45% JavaScript 0.92% Nunjucks 2.01%
csp csp-directives

content-security-policy.com's Introduction

content-security-policy.com

Source code for the content-security-policy.com website

content-security-policy.com's People

Contributors

aurumh4x avatar benmcgarry avatar carpodaster avatar complexsplit avatar dregad avatar iljan avatar jdalton avatar jkmartindale avatar kadrian avatar mathrobin avatar mems avatar miskonception avatar mkobit avatar mplattner avatar nikcorg avatar pfreitag avatar piperchester avatar remyvhw avatar shayanaliabbasi avatar thijzert avatar valentin-p avatar vgrigoriu avatar wyattscarpenter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

content-security-policy.com's Issues

Add hint about generating hash

It would be great to provide a simple instruction that people can use for generating sha256 for their code. For example:

$ echo -n 'box-shadow: none; border: 0px;' | openssl dgst -sha256 -binary | base64

[Question] CSP browser console / Response Headers

Hi,

https://content-security-policy.com/
The site is not using Meta tag probably using server conf .
Using browser console Firefox I can see the CSP line in Response Headers
csp

But if I use Meta tag to set CSP on my testing site I don't see this line .

So I'm wondering does this line is only visible when the CSP is set on the server conf ?
If not, what I am missing ?

Note I'm testing locally.

Add anchors to paragraphs titles

In order to be able to link to specific parts of the document, it would be nice to have anchors on each paragraph header. This eases referring to parts on the site for documentation purposes.

Add reporting documentation

There aren't any great resources available for documenting exactly how the CSP reporting API works.

Some advice on how to set this directive, what to expect (from the JSON payload), and what it means would be handy! As well as an explanation of report-uri and report-to directives.

child-src now deprecated, use frame-src and worker-src instead

I just wanted to give a heads up: the 'frame-src' has been undeprecated, while 'worker-src' has been added to the W3 spec and the child-src has been deprecated (still used as fallback for both 'worker-src' and 'frame-src', which in turn falls back to 'default-src').

Add wasm-eval and document that problem around that

Problem

Chrome required unsafe-eval for loading of WebAssembly code. See WebAssembly/content-security-policy#7 and all the linked issues.

Solution

They have now thankfully added a new wasm-eval in w3c/webappsec-csp#293. As it says there, the spec is wrong, reportedly, Chrome/ium 97 accepts wasm-eval while the spec still calls it wasm-unsafe-eval.

More

After all, the issue is so big they draft a whole new spec about that, apparently: https://w3c.github.io/webappsec-csp/

Can't properly load site in Safari 9.1

Ironically, I can't load this site in Safari 9.1 (OS X 10.11.4) due to CSP issues:

Refused to load the stylesheet 'https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/readable/bootstrap.min.css' because it violates the following Content Security Policy directive: "style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com".

Refused to load the stylesheet 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css' because it violates the following Content Security Policy directive: "style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com".

It looks like maxcdn.bootstrapcdn.com should be allowed by the policy.

Can't load CSS or JS

I saw this error in console:

Refused to load the stylesheet 'https://cdn.plyr.io/3.5.10/plyr.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

How to fix it?

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.