mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
change from header to query as header is not usable with a JS client
This commit is contained in:
parent
6768379602
commit
4db6b2ea06
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user