Closed klaemo closed 7 years ago
Nope, not possible atm with Blankie. You have to set it manually,
plugins/securityHeaders.js (super simple example):
'use strict';
exports.register = (server, options, next) => {
server.ext('onPreResponse', (req, res) => {
const set = req.response;
if (set.header) {
set.header('Content-Security-Policy', 'base-uri https://example.com;');
}
res.continue();
});
next();
};
exports.register.attributes = {
version: '1.0.0',
name: 'securityHeaders'
};
Hey there, I think it would be helpful to be able to set the
base-uri
. Currently I haven't found a way to do that with blankie. Am I missing something?As per Google's CSP evaluator:
Thank you for this plugin!