Open pahlers opened 2 years ago
I am interested in helping you implement this in my fork: https://github.com/melloware/csp-webpack-plugin
I have added more functionality to this core plug-in. Open a ticket on my project and we can work together to get it implemented.
@melloware Let see what we can do. I have my "hackware" used by a client. I did also added some more features. I will update my example code. Let's compare and make a plan! A-team tune starts
I like it!
I added the following feature. All the code is already in the project.
Inline CSP, using the meta-tag, doesn't support sending violation reports to a server.
For that reason my example project is adding a way to generate server configuration files. And it supports adding the headers to allow CSP header during development. I hope this fast feedback loop helps the developer writing a better application.
My suggestion is to split the code in two parts.
I would like to have a library because a big part of my tools can't use the webpack plugin. Like this ticket says the render of the index.html
isn't done by webpack.
Also it allows others developers to write tools for Rollup, Parcell, etc.
Description
The CspHtmlWebpackPlugin is a plugin made for Webpack, but doesn't integrate with the Angular build process anymore. Since Angular 8+ will generate the
index.html
outside the Webpack build process. You need to use theindexTransform
parameter of @angular-builders/custom-webpack to do this.I wrote the code to do this. This code is already being used in production. But I think that it would be nicer when this code is incorporated into this project, so maintaining and testing is more easier.
You can find an example project on https://gitlab.flusso.nl/public-projects/angular-csp-html-transform-example.
I like to help / code this solution, but would like a direction how to do this.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)