Problem with CSP style-src in production

0

Good afternoon I have a page created with Angular Cli and Node.Js, the problem is that in local the page sends correctly the headers of Content-Security-Policy in style-src 'unsafe-inline' but at the time of moving this to a server gives error.

Attached Image of the error and part of the code where I configure the headers of the project.

app.use(function(req, res, next) {
    res.setHeader('Access-Control-Allow-Origin', 'xxxx');
    res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
    res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
    res.setHeader('Access-Control-Allow-Credentials', false);
res.setHeader('Content-Security-Policy',"style-src 'unsafe-inline'")
    next();
});

    
asked by Matias Blanco 19.03.2018 в 20:31
source

0 answers