pageer / lnblog

A flexible, file-based weblog.
https://lnblog.skepticats.com/
GNU General Public License v2.0
0 stars 0 forks source link

Make JavaScript CSP friendlly #50

Open pageer opened 2 years ago

pageer commented 2 years ago

We should support modern browser security features. For a start, we should support Content Security Policies (CSP) that disallow inline JavaScript. Currently, there's a bunch of stuff that probably won't work unless you include the unsafe-inline keyword, which is not recommended.

We can do this by either moving all the scripts to external files or supporting a nonce or hash.