Skip to content

Instantly share code, notes, and snippets.

@paulmwatson
Created December 23, 2021 14:31
Show Gist options
  • Save paulmwatson/d79dc23bbe5b3354d33de8edde4e767f to your computer and use it in GitHub Desktop.
Save paulmwatson/d79dc23bbe5b3354d33de8edde4e767f to your computer and use it in GitHub Desktop.
302 redirect
'use strict';
exports.handler = (event, context, callback) => {
var response = {
"statusCode": 302,
"headers": {
"location": "https://new-domain.tld"
},
"body": "{}",
"isBase64Encoded": false
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment