Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am ratio91 on github.
* I am ratio91 (https://keybase.io/ratio91) on keybase.
* I have a public key ASAxalnugHXqg9-u9s9f8w1jrPBF98Obp27iEjHUTh0Gngo
To claim this, I am signing this object:
@ratio91
ratio91 / azure-pipelines.yml
Created October 7, 2019 07:24
Azure DevOps build pipeline for docker container build and registry upload
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
dockerId: $(dockerId)
imageName: core
/* geolocation-decider - origin request function */
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
/*
* Based on the value of the CloudFront-Viewer-Country header, generate an HTTP status code 302 (Redirect) response, and return a specific URL in the Location header.