@jan I am using Lambda deploy but have a LOCAL stage that uses the the Jovo webhook for testing. Even though it is LOCAL, Amazon is requiring me to run the Certification Validation step so that I can setup a Beta Test. I use beta test in LOCAL to test on other devices in my household.
I am getting the following error and want to know what else I should change:
Error:
The skill end-point is not validating the signatures for incoming requests and is accepting requests with an empty signature URL. Please make sure that your signature validation is correct. To reject an invalid request with an invalid signature or certificate, the skill should respond with HTTP status code 400 (Bad Request) in the response.
With this link:
https://developer.amazon.com/en-US/docs/alexa/custom-skills/host-a-custom-skill-as-a-web-service.html#cert-verify-signature-certificate-url
index.js
'use strict';
const { WebhookVerified, Webhook, ExpressJS, Lambda } = require('jovo-framework');
const { app } = require('./app.js');
// ------------------------------------------------------------------
// HOST CONFIGURATION
// ------------------------------------------------------------------
// ExpressJS (Jovo Webhook)
if (process.argv.indexOf('--webhook') > -1) {
const port = process.env.JOVO_PORT || 3000;
Webhook.jovoApp = app;
Webhook.listen(port, () => {
console.info(`Local server listening on port ${port}.`);
});
Webhook.post(['/webhook','/webhook_alexa'], async (req, res) => {
await app.handle(new ExpressJS(req, res));
});
}
// AWS Lambda
exports.handler = async (event, context, callback) => {
const lambdaHandler = new Lambda(event, context, callback);
if (process.env.NODE_ENV === 'UNIT_TEST') {
lambdaHandler.hasWriteFileAccess = true;
}
await app.handle(lambdaHandler);
};
What changes do I need to make?