Guest User

Untitled

a guest
Oct 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import json
  2. import webrecon.gcse as gcse
  3.  
  4.  
  5. def handler(context, event):
  6. return build_response(gsce.search(event))
  7.  
  8. def build_response(body=[], status=200):
  9. response_object = {
  10. "isBase64Encoded": "false",
  11. "statusCode": status,
  12. "body": json.dumps(body),
  13. "headers": {
  14. "Access-Control-Allow-Origin": "*",
  15. "Access-Control-Allow-Methods":
  16. "DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT",
  17. "Access-Control-Allow-Headers":
  18. "Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token"}}
  19.  
  20. return response_object
Add Comment
Please, Sign In to add comment