CSP nonce with Node.js and EJS

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • Pure

    A set of small, responsive CSS modules that you can use in every web project.

  • Now, to test our CSP, we just have to load some external resources. Let's bring on Pure.css and Lodash. Update index.ejs to look like this :

  • lodash

    A modern JavaScript utility library delivering modularity, performance, & extras.

  • Now, to test our CSP, we just have to load some external resources. Let's bring on Pure.css and Lodash. Update index.ejs to look like this :

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • helmet

    Help secure Express apps with various HTTP headers

  • Imagine, not necessarily because it happens when you are creating an app, having a reasonable amount of scripts and styles to whitelist. The CSP middleware function in the main server file will grow and become sort of ugly and hard to maintain. An excellent alternative would be to use Helmet if you're using Express.

  • Express

    Fast, unopinionated, minimalist web framework for node.

  • Using Express, we can simply do the following :

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts