frux / csp Goto Github PK
View Code? Open in Web Editor NEWMonorepo for CSP-related packages
Monorepo for CSP-related packages
Hi!
Can you specify license for code in repo and npm packages?
It seems that report-uri
is deprecated, and it is good to send both report-uri
and report-to
directives to be on the safe side.
Can you please add it? Or will you merge the PR if I'll add it?
For example we needed 'wasm-unsafe-eval'
and it was sad we couldn't just include it from the lib.
If we create a preset from policies, a directive might get both the 'none'
and other source values.
console.log(
getCSP({
presets: {
default: {
'connect-src': [NONE],
},
api: {
'connect-src': ['https://api.example.net'],
},
},
})
);
This example yields the following CSP:
connect-src 'none' https://api.example.net;
If we include this in a web page, Google Chrome will give the following error:
The Content-Security-Policy directive ‘connect-src’ contains the keyword ‘none’ alongside with other source expressions. The keyword ‘none’ must be the only source expression in the directive value, otherwise it is ignored.
While this works as expected, we can connect to the API successfully, it could be nice if this plugin filters out the 'none'
value if other values are present.
The "expected" output (at least according to Google Chrome) for this CSP would be:
connect-src https://api.example.net;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.