Skip to content

Instantly share code, notes, and snippets.

Davide Ferrari vide

Block or report user

Report or block vide

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lmakarov / lambda-basic-auth.js
Created Aug 30, 2017
Basic HTTP Authentication for CloudFront with Lambda@Edge
View lambda-basic-auth.js
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
You can’t perform that action at this time.