From 4db6b2ea062f2150df8a0ce142e706c44c4cec2e Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 22 Feb 2019 09:40:40 +0100 Subject: [PATCH] change from header to query as header is not usable with a JS client --- docs/providers/aws/events/websocket.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/providers/aws/events/websocket.md b/docs/providers/aws/events/websocket.md index d3c50d58b..849cc20ae 100644 --- a/docs/providers/aws/events/websocket.md +++ b/docs/providers/aws/events/websocket.md @@ -94,10 +94,10 @@ module.exports.connectionHandler = async (event, context) => { if(event.requestContext.routeKey === '$connect'){ console.log("NEW CONNECTION INCOMMING"); - if (event.headers.token !== 'abc') { + if (event.queryStringParameters.token !== 'abc') { console.log('Connection blocked'); return { - statusCode: 500 + statusCode: 500 // currently it is not possible to respond with a 4XX }; } }