tower-helmet
this is still very work in progress
a port of the beautiful helmet.js in the javascript world.
tower-helmet helps you secure your tower server by setting various HTTP headers. It's not a silver bullet, but it can help!
You can find a list of all available headers under the [header] module. By default (with [HelmetLayer::default]) all of them are enabled. Please take a good look at [ContentSecurityPolicy]. Most of the time you will need to adapt this one to your needs.
Examples
use ;
use HelmetLayer;
// default layer with all security headers active
let layer = with_defaults;
// default layer with customizations applied
let mut directives = new;
directives.insert;
directives.insert;
directives.insert;
let csp = ContentSecurityPolicy ;
let layer = with_defaults.enable;
// completely blank layer, selectively enable and add headers
let layer = blank
.enable
.enable;