Setting the file. One moment.
Chapter 110 · Deploying Custom Domain REST API
Subchapter 110.3
scripts/example_function.mjs
JavaScript14 lines445 B
export const handler = async (event, context) => {
return {
statusCode: 200,
headers: {
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains',
'Content-Type': 'application/json',
'X-Content-Type-Options': 'nosniff',
'X-Frame-Options': 'DENY',
},
body: JSON.stringify({
message: "Hello from the example function!",
}),
};
};