Skip to content

Instantly share code, notes, and snippets.


René Milzarek neotreat

  • Crashtest Security GmbH
View GitHub Profile
neotreat / meta-csp.html
Created Sep 12, 2017
A basic example for a Content-Security-Policy using a meta-tag.
View meta-csp.html
<!doctype html>
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
neotreat / http-security-headers-lambda-cloudfront.js
Last active Aug 28, 2018
Add HTTP Security Headers to Cloudfront with Lambda@Edge.
View http-security-headers-lambda-cloudfront.js
'use strict';
exports.handler = (event, context, callback) => {
const response = event.Records[0].cf.response;
const headers = response.headers;
// Add security headers
const securityHeaders = [