apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB
https://github.com/apache/couchdb-fauxton
Apache License 2.0
385 stars 224 forks source link

Extract all styles from index html #1332

Closed rhyshort closed 1 year ago

rhyshort commented 2 years ago

Overview

Configure webpack to insert generated css styles as links rather than inline. This completely removes the need for CSP policies with style-src unsafe-inline, enabling users to have more restrictive CSP policies.

Testing recommendations

To verify if the styles are correctly loaded a server with the CSP policy preventing unsafe-inline styles needs to be used, javascript needs to be disabled in the browser to verify the styles are correctly applied for the nonscript use case.

GitHub issue number

n/a

Related Pull Requests

Checklist

nickva commented 1 year ago

@rhyshort do we still want to merge this, wonder if anyone can review it? I don't know much JS to be able to help but we're about to make a new 3.3 release and was looking at pending Fauxton pull requests

rhyshort commented 1 year ago

Probably best not given the conflicts.