11'use strict'
22
3- const reponseHeadersJson = {
3+ const responseHeadersJson = {
44 'Access-Control-Allow-Origin' : '*' , // Required for CORS support to work
55 'Access-Control-Allow-Credentials' : true ,
66 'Access-Control-Expose-Headers' : 'link' ,
@@ -18,7 +18,7 @@ module.exports.router = (event, context, callback) => {
1818}
1919
2020function exampleMessageGet ( event , context , callback ) {
21- let headers = reponseHeadersJson
21+ let headers = responseHeadersJson
2222 let scheme = event . headers [ 'X-Forwarded-Proto' ]
2323 let host = event . headers . Host
2424 let path = event . requestContext . path . replace ( 'example/message' , 'example/do-something' )
@@ -37,7 +37,7 @@ function exampleDoSomethingPost (event, context, callback) {
3737 if ( body . constructor !== Array ) {
3838 return {
3939 statusCode : 400 ,
40- headers : reponseHeadersJson ,
40+ headers : responseHeadersJson ,
4141 body : JSON . stringify ( {
4242 message : 'The supplied request body must be a JSON array' ,
4343 statusCode : '400'
@@ -47,7 +47,7 @@ function exampleDoSomethingPost (event, context, callback) {
4747 let itemCount = body . length
4848 return {
4949 statusCode : 200 ,
50- headers : reponseHeadersJson ,
50+ headers : responseHeadersJson ,
5151 body : JSON . stringify ( {
5252 result : 'Thanks for sending that data' ,
5353 submittedItems : itemCount
0 commit comments