View infustionsoftWebForm.js
This file contains 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
function getParameterByName(name, url) { | |
if (!url) { | |
url = window.location.href; | |
} | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) { | |
return null; | |
} |
View apiGatewayPassthroughMapping.js
This file contains 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
#set($propertyRegex = '\\n') | |
#set($allParams = $input.params()) | |
{ | |
"body-xml" : $input.json('$').replaceAll($propertyRegex, ''), | |
"params" : { | |
#foreach($type in $allParams.keySet()) | |
#set($params = $allParams.get($type)) | |
"$type" : { | |
#foreach($paramName in $params.keySet()) | |
"$paramName" : "$util.escapeJavaScript($params.get($paramName))" |
View simpleLambdaResponse.js
This file contains 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.handler = function (event, context, callback) { | |
let respondToGateway = { | |
statusCode: '200', | |
body : JSON.stringify({ | |
event: event, | |
context: context | |
}), | |
headers : { | |
'Content-Type': 'application/json' | |
} |
View simpleXmlLambdaResponse.js
This file contains 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
var parseString = require('xml2js').parseString; | |
exports.handler = function (event, context, callback) { | |
parseString(event.body, function (err, result) { | |
event.body = result; | |
let respondToGateway = { | |
statusCode: '200', | |
body : JSON.stringify({ | |
event: event, |
View s3PublicPolicy.json
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Id": "1", | |
"Statement": [ | |
{ | |
"Sid": "1", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
View S3Redirect.xml
This file contains 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
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<KeyPrefixEquals/> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<Protocol>https</Protocol> | |
<HostName>newDomain.com</HostName> | |
<ReplaceKeyPrefixWith>oldStuff/?page=</ReplaceKeyPrefixWith> |