Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Created September 19, 2017 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbnpercy/05d15ae7181eb20d8c7a2537e1940e00 to your computer and use it in GitHub Desktop.
Save rbnpercy/05d15ae7181eb20d8c7a2537e1940e00 to your computer and use it in GitHub Desktop.
var express = require('express');
var app = express();
app.use(function(req, res, next) {
res.setHeader( "Content-Security-Policy", "script-src 'self' https://analytics.google.com" );
return next();
});
app.use(express.static(__dirname + '/'));
app.listen(process.env.PORT || 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment