Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // handler.js
  2.  
  3. 'use strict';
  4.  
  5. module.exports.hello = function(event, context, callback) {
  6.  
  7. const response = {
  8. statusCode: 200,
  9. headers: {
  10. "Access-Control-Allow-Origin" : "*", // Required for CORS support to work
  11. "Access-Control-Allow-Credentials" : true // Required for cookies, authorization headers with HTTPS
  12. },
  13. body: JSON.stringify({ "message": "Hello World!" })
  14. };
  15.  
  16. callback(null, response);
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement