This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (digest == signature) { | |
| // Request is valid | |
| } else { | |
| // Request is invalid | |
| console.log("Request is invalid"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports = function(payload) { | |
| var queryArg = payload.query.arg || ''; | |
| var body = {}; | |
| if (payload.body) { | |
| body = JSON.parse(payload.body.text()); | |
| } | |
| // Get x-signature header and create digest for comparison |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| files: | |
| "/home/ec2-user/new_relic_servers_setup.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/usr/bin/env bash | |
| printf "license_key: $NEW_RELIC_LICENSE_KEY" | sudo tee /etc/newrelic-infra.yml | |
| printf "[newrelic-infra]\nname=New Relic Infrastructure\nbaseurl=http://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64\nenable=1\ngpgcheck=0" | sudo tee /etc/yum.repos.d/newrelic-infra.repo | |
| yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' |