Features
#14 [feature] Enable default headers at function entry
endpoint can now be configured with an options argument
// handler.js
const endpoint = require('serverless-endpoint');
// options
const opts = {
headers: { "Access-Control-Allow-Origin": "*" }
}
// endpoint /hello
function getHelloWorld(req, res) {
res.send(200, { message: `Hello World!` })
}
module.exports.getHelloWorld = endpoint(getHelloWorld, opts)